How to connect to CockroachDB using DBeaver

Luiz Gustavo De O. Costa
3 min readDec 3, 2021

--

CockroachDB is a distributed SQL database built on a transactional and strongly-consistent key-value store. It scales horizontally; survives disk, machine, rack, and even datacenter failures with minimal latency disruption and no manual intervention; supports strongly-consistent ACID transactions; and provides a familiar SQL API for structuring, manipulating, and querying data.

Cloud + hacks image

And to enjoy all the features the best way is to use the cloud version.

1. Assumptions

You’re using the Cockroach in the cloud

2. Why?

This tutorial came to explain how to connect using DBeaver.

3. Benefits

The client is more interesting than creating a program for DML/DDL operations.

4. Connections

4.1. Get the database info

In the configuration phase, we’ll need the following fields: username, host, port, database and the certificate.

CockroachDB info

4.2. DBeaver

Download the DBevaer Community, since this software is universal to any database will be a great tool for us.

Create a new connection

The default values, we need to change

Default configuration
CockroachDB configuration
Connection confirmation
Connected

4.3 Using certificate

If you’re using certificate, pay attention for two those values into the Driver properties, the options and the sslrootcert keys AND into the SSL, the CA Certificate value.

Driver properties
SSL config

5. Versions

  • DBeaver — 21.3.0.202111281534
  • CockroachDB — v21.2.0-beta.4

6. References

https://pixabay.com/illustrations/cloud-technology-service-database-5469737/

--

--

Luiz Gustavo De O. Costa
Luiz Gustavo De O. Costa

Written by Luiz Gustavo De O. Costa

Hey friend!! I’m Luiz Gustavo, a Java developer and I’m here to learn and write about Java, tests and good practices

No responses yet