Documentation
Connect to the Database
Connecting directly to the database is often useful to get an idea of what data is stored and processes are running. You may want to quickly check out a bit of data, do a bit of debugging, or get to the bottom of some slow queries.
Note: If you're looking to import data, we'd recommend taking a look at the Import Database documentation.
1. Start an SSH Tunnel #
Connections to the database are established via SSH Tunnels. This ensures that your database is never exposed to the public internet and you can strictly control who has access.
-
Go to your project's Access Control page.
-
Create a new SSH Session. You can read more about SSH Sessions here.
-
In the "SSH Connection" section, select an environment and check the "Include database port forward" option.
-
Copy the supplied SSH Connection string into a terminal on your local machine.
Run it to open an SSH connection with an included port forward for the database.
-
You can now use the details supplied in the "Database Connection" section to connect directly to the database running on Servd.
2. Connect via a Database Client #
Each database client requires slightly different steps to configure. Here are a few guides for some popular ones: