Documentation
CockroachDB
Connect TableR to CockroachDB — a self-hosted node or CockroachDB Cloud. It speaks the PostgreSQL wire protocol, so the fields, connection strings, and SSL/TLS work like PostgreSQL.
CockroachDB is a distributed SQL engine that speaks the PostgreSQL wire protocol, so TableR connects to it exactly like PostgreSQL. Fill the connection form to point at a node or a CockroachDB Cloud cluster.
Overview
Because CockroachDB uses the PostgreSQL wire protocol, the same connection fields and connection strings as PostgreSQL apply. It works with a local node, a self-hosted cluster, or CockroachDB Cloud; only the values change.
- Local / self-hosted — connect to a node on 127.0.0.1:26257.
- CockroachDB Cloud — use the cluster endpoint and enable SSL/TLS (usually required).
- PostgreSQL-compatible — fields, connection strings, and behaviour match PostgreSQL; see the PostgreSQL guide for anything not covered here.
Before you start
- A reachable CockroachDB node or cluster (host and port).
- A database user name — this is required.
- The user's password, if the cluster requires one.
- Optionally, the specific database to open on connect.
- For CockroachDB Cloud: network access to the port and SSL/TLS enabled.
Connection fields
These defaults match TableR's CockroachDB connection form, which mirrors PostgreSQL. Secrets are written to the operating system keyring, never to plain configuration files.
| Field | Required | Default | Notes |
|---|---|---|---|
| Host | Yes | 127.0.0.1 | Hostname or IP of your node, or your CockroachDB Cloud host. |
| Port | Yes | 26257 | CockroachDB's default port. Change it only if your node listens elsewhere. |
| Username | Yes | — | The database user used to authenticate. |
| Password | No | — | Optional; stored in the OS keyring. |
| Database | No | — | Optional. When empty, the user's default database is used. |
| SSL/TLS | No | Off | Enable for remote clusters; CockroachDB Cloud usually requires it. |
Connect with the form
- 1Choose CockroachDB
Open the launcher and pick the CockroachDB card.
- 2Enter host and port
Use 127.0.0.1 and 26257 for a local node, or your CockroachDB Cloud endpoint for a remote cluster.
- 3Add credentials
Type the username, and the password if required. The password is saved to the OS keyring.
- 4Pick a database (optional)
Set a database to open it directly, or leave it blank to use the user's default.
- 5Enable SSL/TLS for remote
Turn on SSL/TLS when connecting to CockroachDB Cloud or any remote cluster.
- 6Save and connect
Save the profile so it reappears in the launcher, then connect.
Use a connection string
Because CockroachDB speaks the PostgreSQL protocol, you can paste a PostgreSQL connection URI. Both postgres:// and postgresql:// schemes are accepted.
postgresql://username:password@host:26257/database?sslmode=verify-full- Omit the password from the URI and let TableR store it in the keyring instead.
- Append sslmode=verify-full for CockroachDB Cloud, or sslmode=require for other remote clusters.
- URL-encode special characters in the password (for example @ becomes %40).
SSL/TLS
Local nodes on 127.0.0.1 usually need no encryption. For anything over a network — and always for CockroachDB Cloud — enable SSL/TLS. If you connect with a URI, control the behaviour with the sslmode parameter.
- disable — no encryption (local only).
- require — encrypt, but do not verify the server certificate.
- verify-ca / verify-full — encrypt and verify the certificate (required by CockroachDB Cloud).
Verify the connection
Once connected, open a SQL tab and run a quick check:
SELECT version();
SELECT current_database(), current_user;If both statements return rows, the connection and credentials are working.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Connection refused | Node not running, wrong host/port, or a firewall. | Confirm the node is up and the port is reachable; re-check host and port. |
| password authentication failed | Wrong username or password. | Re-check the credentials and update the saved password (it lives in the keyring). |
| SSL / certificate required | The cluster requires TLS (typical for CockroachDB Cloud). | Enable SSL/TLS, or add sslmode=verify-full to the connection string. |
| database 'name' does not exist | The Database field names a database that is missing. | Leave Database empty, or enter one that exists. |