Connect with GUI Clients
This guide is provided for informational purposes. Because it involves third party tooling we cannot guarantee things still work exactly as described here.
Graphical clients such as pgAdmin, DBeaver or DataGrip connect to Managed PostgreSQL with the same values as any other client. This recipe lists those values and where each one goes. For the menus of a given client, follow its own documentation.
Prerequisites
- A running Managed PostgreSQL service.
- The Exoscale CLI, configured with your API credentials, and
jq. - The public IP address of your machine in the service IP filter. See Restrict Connections to a Service.
Collect the Connection Values
exo dbaas show SERVICE_NAME -z ZONE -O json | jq '.pg.uri_params | del(.password)'
exo dbaas user reveal-secrets SERVICE_NAME avnadmin -z ZONE
exo dbaas ca-certificate -z ZONE > ca.pemParameters:
SERVICE_NAME: name of your Managed PostgreSQL service, for examplemy-postgresql.ZONE: Exoscale zone the service runs in, for examplech-gva-2.
Save ca.pem in a stable location, such as your home directory: clients store the path to it.
| Client field | Value |
|---|---|
| Host | the host value. Keep the hostname, do not replace it with an alias. |
| Port | the port value. It is assigned per service and is not 5432. |
| Database | the dbname value, defaultdb by default |
| Username | the user value, avnadmin, or a user you created |
| Password | the password from exo dbaas user reveal-secrets |
| SSL mode | verify-full |
| Root certificate, or CA file | the absolute path to ca.pem |
Leave the client certificate and client key fields empty: the service authenticates clients with a password.
Clients Based on JDBC
DBeaver, DataGrip and other tools built on the PostgreSQL JDBC driver also accept a URL:
jdbc:postgresql://HOST:PORT/DATABASE_NAME?sslmode=verify-full&sslrootcert=CA_PATHParameters:
HOST,PORT,DATABASE_NAME: thehost,portanddbnamevalues above.CA_PATH: absolute path toca.pem.
Enter the username and the password in the authentication fields of the client. For the driver parameters, see Connect with Java.
Troubleshooting
| Symptom | Cause |
|---|---|
| The client hangs, then reports that the server is unreachable | Your public IP address is not in the service IP filter. It changes when you switch networks or VPN. |
no pg_hba.conf entry ... no encryption | SSL is turned off in the connection settings. |
certificate verify failed, or PKIX path building failed in JDBC clients | The root certificate is missing, or is not the ca.pem of your organization. |
password authentication failed | The password was rotated. Read it again with exo dbaas user reveal-secrets. |
Related Pages
Last updated on