Add a database

You can use Plato to connect and manage any MySQL or PostgreSQL database listening on a public IP address. If your database is running inside a private network with no public internet access, please contact us and we can help deploy Plato inside your network.

  1. To ensure Plato can connect to your database, navigate to your cloud admin console or server configuration and whitelist Plato’s IP address: 34.82.67.27.

  2. In the lefthand nav bar, click the “Add New” button.

  3. Click “Add Database”.

  4. Select your database engine. Plato currently supports MySQL and PostgreSQL.

  5. Enter the name of your database. This must match the name of your database on your server.

  6. Enter the host and port on which your database is listening.

  7. Enter the username and password of the user that Plato will use to connect to your database.

    You can enter the credentials of an existing user, but we strongly recommend provisioning a dedicated user, often named plato. Many Plato users choose to provision a user with write access so they can update their database inside of Plato, but if needed you may choose to provision a read-only user.

  8. (Optional) To encrypt the connection between Plato and your database, toggle “Connect with SSL”. Your database must be configured to support SSL.

  9. (Optional) If your database is configured to authenticate clients with an SSL keypair, toggle “Connect with an SSL keypair” and paste your the public certificate and private key for the user you specified above.

  10. Click “Add Database”. If there are connection errors, they will be displayed at the bottom of the form. If the connection is successful, you will see your database and all its tables added to the lefthand nav bar.

Note: Tables without primary keys will not be displayed in Plato, because many features require rows to have a unique identity. Primary keys also happen to be a best practice in relational database design, so we strongly recommend defining one for each table.

Provision a read-only user

While you can reuse an existing database user for Plato, we strongly recommend provisioning a dedicated user. Many Plato users choose to provision a read-write user so they can update their database in Plato, but if you know you’ll only use Plato for queries, you may want to provision a read-only user.

PostgreSQL

To provision a read-only user named plato in a PostgreSQL database named production, issue the following commands:

  1. Log in to the PostgreSQL server with a superuser account: