Connect a database
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.
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.
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:
CREATE USER plato WITH PASSWORD 'password';
Replace ‘password’ with a strong password for the user.
GRANT CONNECT ON DATABASE production TO plato;GRANT USAGE ON SCHEMA public TO plato;GRANT SELECT ON ALL TABLES IN SCHEMA public TO plato;
MySQL
To provision a read-only user named plato in a MySQL database named production, issue the following commands:
CREATE USER 'plato'@'34.82.67.27' IDENTIFIED BY 'password';
Replace 'password' with a strong password for the user.
GRANT SELECT ON production.* TO 'plato'@'34.82.67.27';