DBeaver

Connecting with DBeaver

DBeaver is an open source database tool that you can use to connect to your Crunchy Bridge cluster. For this walkthrough, we assume you already have DBeaver installed on your machine.

Find your connection string

If you haven't created your Crunchy Bridge Team or Cluster, the Getting Started page will guide you through the process.

Once you've created the cluster, you'll use the connection string in order to connect to DBeaver. A connection string looks like this:

postgres://user:password@host:port/database?setting=value

From a cluster's details page, you can find the connection string in the Connections tab. DBeaver uses JDBC to connect, so you'll want to choose that format in the Connection String generator:

Create a new database connection in DBeaver

Now you're ready to create a new Database Connection in DBeaver. Go to File -> New, then select "New Database Connection" or navigate to it in the DBeaver Wizards folder. Choose "PostgreSQL" for the Database Driver:

Info

Note: If this is the first time you have connected to a Postgres database with DBeaver, you'll need to follow the prompts to install the drivers.

Configuration connection

First, remove the default values DBeaver provides for Host, Database, and Port. DBeaver will use these values even if you choose to connect by URL, so it's important to remove them:

Info

"Connection Refused" errors later in the process may be due to the Host field shown above defaulting to localhost and not being properly cleared.

Next, choose Connect by: URL and paste the connection string into the URL field:

Finally, click over to the SSL tab, check Use SSL, and choose SSL mode: require:

Now you can test the connection by clicking on the Test Connection button. If DBeaver is configured properly, you should see the following:

If it's successful, congratulations! Click OK then Finish to save your connection. If you run into an error, check out the troubleshooting section below.

Certificate Verification

For an additional layer of security, you can choose to connect to DBeaver using SSL mode: verify-full, which verifies the self-signed root certificate associated with your Crunchy Bridge Team.

First, you'll need to download the certificate for the Team that owns the cluster to which you want to connect. To find it, navigate to the Team Overview page by clicking on the name of the team in the Dashboard. Then click into the Settings tab to locate and download the certificate. Read more about certificates on the SSL Concepts page.

Once you've downloaded the certificate, you'll need to tell DBeaver where to find it. Click on the folder icon next to the CA Certificate field, or type in the absolute URL to the team.pem file you downloaded:

Change SSL mode: to verify-full and click Test Connection to make sure it works.

Troubleshooting

Note that only TLS v1.2 and 1.3 are supported by Crunchy Bridge. You can read more about the SSL requirements on the SSL Concepts page.

Connection Refused If you receive a Connection Refused error, double check that the Host, Database, and Port fields on the Main tab are blank.

Invalid JDBC URL This error could mean that you accidentally copied the connection string in the wrong format (e.g. psql format) or that it was partially or incorrectly pasted into the URL field.

Connection attempt timed out If the connection is timing out, it could be that:

  • The connection string was copied or pasted partially or incorrectly
  • Your firewall settings are not allowing the connection
  • Your network connection is unstable or currently down

When using verify-full with your downloaded root certificate:

  • You're using a certificate from a different team than owns the cluster to which you're connecting
  • DBeaver can't find the certificate on the path you specified