Create a database from TablePlus: PostgreSQL or MySQL

By Anil Gautam · September 20, 2026

You can create a database from a SQL client such as TablePlus if your server account has permission. Use the command for the connected engine. Saving a new connection in the client only saves the connection details; it doesn’t create a database.

Verify the server first

Use an approved development server and a role authorized to create databases. In PostgreSQL, run SELECT current_database(), current_user; in MySQL, run SELECT DATABASE(), CURRENT_USER();. Confirm that you are not connected to production.

PostgreSQL

Connect to an existing database on the intended PostgreSQL server. With the necessary permissions, execute this example as a standalone statement, outside a transaction block:

CREATE DATABASE app_sandbox;

Choose an unused name appropriate to your environment. Then establish a connection to app_sandbox before creating its tables. PostgreSQL does not use MySQL’s USE command to switch the current connection to another database. See the CREATE DATABASE reference for privileges and options.

MySQL or MariaDB

For a permitted development session, the basic sequence is:

CREATE DATABASE app_sandbox;
USE app_sandbox;
SELECT DATABASE();

Review the server’s character-set and collation defaults before using the new database for an application. Use the character set and collation your project needs. Database creation does not create application users or grant them access automatically.

Understand what was created

A normal empty template does not contain your application tables; a customized PostgreSQL template can contain pre-existing objects. Apply the project’s reviewed migrations next. If the goal is a copy of an existing environment, creating an empty database is only the destination step; follow an appropriate backup and restore procedure.

Do not add a DROP DATABASE cleanup command to a shared script casually. Verify ownership and data retention before removing any database.

Using a different client

The same engine-specific SQL can run in plainDB’s SQL editor with an authorized connection. SQL-editor commands execute directly; the table grid’s staged-edit review is not a review gate for arbitrary SQL. Read how to inspect MySQL databases or the PostgreSQL viewer guide to verify the result.