New in v2.1: 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.
For more information about using DBeaver, see the DBeaver documentation.
If you run into problems, please file an issue on the DBeaver issue tracker.
Before You Begin
To work through this tutorial, take the following steps:
- Install CockroachDB and start a secure cluster.
- Download a copy of DBeaver version 5.2.3 or greater.
Step 1. Start DBeaver and connect to CockroachDB
Start DBeaver, and select Database > New Connection from the menu. In the dialog that appears, select CockroachDB from the list.
Step 2. Update the connection settings
On the Create new connection dialog that appears, click Network settings.
From the network settings, click the SSL tab. It will look like the screenshot below.
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 below. Once you have created the file, enter its location here. In this example, the filename isclient.root.pk8
.$ openssl pkcs8 -topk8 -inform PEM -outform DER -in client.root.key -out client.root.pk8 -nocrypt
Select require 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
Click Test Connection .... If everything worked, you will see a Success dialog like the one shown below.
Step 4. Start using DBeaver
Click Finish to get started using DBeaver with CockroachDB.
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.