Skip to content

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

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.pem

Parameters:

  • SERVICE_NAME: name of your Managed PostgreSQL service, for example my-postgresql.
  • ZONE: Exoscale zone the service runs in, for example ch-gva-2.

Save ca.pem in a stable location, such as your home directory: clients store the path to it.

Client fieldValue
Hostthe host value. Keep the hostname, do not replace it with an alias.
Portthe port value. It is assigned per service and is not 5432.
Databasethe dbname value, defaultdb by default
Usernamethe user value, avnadmin, or a user you created
Passwordthe password from exo dbaas user reveal-secrets
SSL modeverify-full
Root certificate, or CA filethe 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_PATH

Parameters:

  • HOST, PORT, DATABASE_NAME: the host, port and dbname values above.
  • CA_PATH: absolute path to ca.pem.

Enter the username and the password in the authentication fields of the client. For the driver parameters, see Connect with Java.

Troubleshooting

SymptomCause
The client hangs, then reports that the server is unreachableYour public IP address is not in the service IP filter. It changes when you switch networks or VPN.
no pg_hba.conf entry ... no encryptionSSL is turned off in the connection settings.
certificate verify failed, or PKIX path building failed in JDBC clientsThe root certificate is missing, or is not the ca.pem of your organization.
password authentication failedThe password was rotated. Read it again with exo dbaas user reveal-secrets.

Related Pages

Last updated on