Download Cockroach JDBC Driver

Download the Cockroach JDBC driver, copy the JDBC URL into DbSchema, and start designing schemas with ER diagrams — free Community Edition.

Connect Cockroach in DbSchema Install the driver, open a connection, reverse engineer your schema, and sync changes visually.

About the Cockroach JDBC driver

A JDBC driver is a Java .jar library that lets applications connect to Cockroach. DbSchema uses JDBC to reverse engineer schemas, run SQL, and generate documentation. Driver files are usually published by the database vendor or an open-source project.

JDBC URL format

Host, port, database name, and SSL options are passed in a URL starting with jdbc:. Each Cockroach driver uses its own syntax — see the connection details below.

The Cockroach JDBC driver

CockroachDB is a distributed SQL database that uses the PostgreSQL wire protocol and is designed for horizontal scalability, strong consistency, and survivability across datacenter failures. It is a popular choice for globally distributed applications that need ACID transactions at scale.

CockroachDB is wire-compatible with PostgreSQL, so DbSchema connects using the standard PostgreSQL JDBC driver.

The CockroachDB JDBC URL

  • Required File(s): postgresql-nn.jdbc3.jar
  • Java Driver Class: org.postgresql.Driver
  • JDBC URL: jdbc:postgresql://HOST[:PORT]/DB
  • Website: CockroachDB

Download CockroachDB JDBC Driver

The driver archive is a zip file. Extract it and load the .jar files using DbSchema's Driver Manager.

Connecting to a Self-Hosted Cluster

Any node answers SQL, so pick whichever one is reachable — the cluster routes the work internally.

  1. Use the SQL port, 26257. A node started without --sql-addr serves both SQL clients and inter-node traffic on 26257. Where the two were separated at start-up, --sql-addr holds the one you need and --listen-addr is for the cluster's own traffic — connecting to the latter fails.
  2. Match the cluster's security mode. A secure cluster refuses plaintext, so append ?sslmode=require to the URL. A cluster started with --insecure takes any user without a password, which is why it belongs on a private network only.
  3. Open port 26257 in the server's firewall. The database listens on port 26257 unless it was installed with a different one. A host firewall on the server blocks incoming connections on that port until a rule allows them. The firewall guide has the commands for Windows, ufw, firewalld and iptables.
  4. Connect from DbSchema. In the Connection Dialog choose Remote computer or custom port, fill in the server host and the port, then press Test Connection to check that the server answers before you connect.

CockroachDB Cloud

A managed cluster is reached over the internet with TLS, and the console hands you every value.

  1. Allowlist your IP address. Add it to the cluster's allowed network list in the console, otherwise the connection is refused before authentication.
  2. Copy the JDBC URL from the CockroachDB Cloud console. You will find it in the cluster's Connect dialog.
  3. Paste the URL into DbSchema. In the Connection Dialog set Connection Mode to Edit the JDBC URL Manually and paste the string you copied. The user and the password are entered in the first tab, not in the URL.

DbSchema also ships a Cluster entry in the Connection Mode combo. It sets sslmode=require for you and offers a Cluster field for the routing name that appears in the console's connection string.

DbSchema and CockroachDB

Because CockroachDB speaks PostgreSQL, DbSchema connects using the standard PostgreSQL JDBC driver and renders tables, foreign keys, and indexes exactly as it would for PostgreSQL. Use DbSchema's Schema Synchronization to manage CockroachDB schema migrations across regions.

Test the driver with DbSchema

Connect Cockroach, build your first ER diagram in minutes. No account required.

1
Download driver & DbSchema

Get the Cockroach driver zip below and install DbSchema for Windows, macOS, or Linux.

2
Register the .jar

In DbSchema, open Driver Manager, add the extracted JAR, and paste your JDBC URL.

3
Design & document

Reverse engineer Cockroach, edit the model visually, and publish schema documentation.

Use Cockroach visually in DbSchema

After the JDBC driver connects, you get ER diagrams, SQL editor, schema sync, and HTML documentation in one desktop app. Compare DbSchema editions.

ER diagrams

Reverse engineer Cockroach into an interactive diagram and edit structures visually.

SQL & query builder

Run SQL with autocomplete or compose queries without writing every join by hand.

Schema documentation

Export HTML docs your team can browse without installing DbSchema.

Full Cockroach guide

Connection tips, ports, SSL, and schema design workflows on the database landing page.

Other drivers teams often configure alongside Cockroach.

Browse all JDBC driver downloads

Teams working with Cockroach often use these engines too. Explore dedicated guides and JDBC setup for each.

Browse all 100+ supported databases