Visualize CockroachDB Schemas with DBeaver

On this page Carat arrow pointing down

The DBeaver database tool is a tool that completely integrates with CockroachDB to provide a GUI for managing your database.

According to the DBeaver website:

DBeaver is a cross-platform Database GUI tool for developers, SQL programmers, database administrators, and analysts.

In this tutorial, you'll work through the process of using DBeaver with a secure CockroachDB cluster.

Tip:

For more information about using DBeaver, see the DBeaver documentation.

If you run into problems, please file an issue on the DBeaver issue tracker.

For information on using DBeaver with CockroachDB Cloud, see this blog post.

Before You Begin

To work through this tutorial, take the following steps:

Step 1. Start DBeaver and connect to CockroachDB

  1. Start DBeaver, and select Database > New Connection from the menu. In the dialog that appears, select CockroachDB from the list.

    DBeaver - Select CockroachDB

  2. Click Next. The Connection Settings dialog displays.

  3. In the Database field, enter movr.

    DBeaver - CockroachDB connection settings

Step 2. Update the connection settings

  1. Click the SSL tab.

    DBeaver - SSL tab

  2. Check the Use SSL checkbox as shown, and fill in the text areas as follows:

    • Root certificate: Use the ca.crt file you generated for your secure cluster.
    • SSL certificate: Use a client certificate generated from your cluster's root certificate. For the root user, this will be named client.root.crt. For additional security, you may want to create a new database user and client certificate just for use with DBeaver.
    • SSL certificate key: Because DBeaver is a Java application, you will need to transform your key file to the *.pk8 format using an OpenSSL command like the one shown in the following snippet. Once you have created the file, enter its location here. In this example, the filename is client.root.pk8.

      icon/buttons/copy

      $ openssl pkcs8 -topk8 -inform PEM -outform DER -in client.root.key -out client.root.pk8 -nocrypt
      
  3. Select verify-ca or verify-full from the SSL mode dropdown. There is no need to set the SSL Factory; you can let DBeaver use the default.

Step 3. Test the connection settings

  1. Click Test Connection .... If you need a driver, the following dialog displays:

    DBeaver - download driver dialog

  2. Click Download.

    After the driver downloads, if the connection was successful, you will see a Connected dialog.

    DBeaver - connection success dialog

  3. Click OK to dismiss the dialog.

Step 4. Start using DBeaver

Expand the movr database node and navigate to the rides table.

DBeaver - CockroachDB with the movr database

For more information about using DBeaver, see the DBeaver documentation.

Report Issues with DBeaver & CockroachDB

If you run into problems, please file an issue on the DBeaver issue tracker, including the following details about the environment where you encountered the issue:

  • CockroachDB version (cockroach version)
  • DBeaver version
  • Operating system
  • Steps to reproduce the behavior
  • If possible, a trace of the SQL statements sent to CockroachDB while the error is being reproduced using SQL query logging.

See Also


Yes No
On this page

Yes No