Getting Started with CockroachDB Source Configuration
Requirements:
- Active CockroachDB cluster (Self-hosted or CockroachDB Cloud).
- Allow connections from Databrain to your CockroachDB cluster.
- Ensure your CockroachDB user has sufficient read permissions.
- Choose the Databrain Workspace to which you wish to connect the data.
Allow Access to our IP
Setup Guide:
-
Ensure Database Accessibility:
- Ensure your CockroachDB cluster is active and accessible from the machine running Databrain.
- Accessibility depends on:
- Network rules / firewall settings
- CockroachDB Cloud IP allowlisting (if using managed cloud)
- User privileges
- The easiest way to verify connectivity is by using the Authenticate button in the Databrain connection UI after filling in the details.
-
Grant Necessary Permissions:
- Databrain requires:
- Read access on tables
- Access to metadata (information_schema)
- Usage on schema
- Databrain requires:
schema_name and username with your actual values.
-
Fill Up Connection Info:
Provide the following details in the Databrain UI:
- Integration Name: Pick a name to help you identify this source in Databrain (e.g., CockroachDB – Production).
- Host: Hostname of the CockroachDB cluster (Example: free-tier.gcp-us-central1.cockroachlabs.cloud)
- Port:
26257(Default CockroachDB SQL port) Note: Some managed environments may expose 5432 for Postgres compatibility. - Database Name: Name of the database you want to sync.
- Username: CockroachDB user with read access.
- Password: Password associated with the username.
- Schemas: Defaults to
public. Provide a comma-separated list (case sensitive) if syncing from multiple schemas. - Encryption: CockroachDB requires secure connections (TLS/SSL) in most deployments.
- SSL Mode: Enable SSL Mode if:
- You are using CockroachDB Cloud
- TLS is enforced in your cluster (default in most setups)
- If your cluster enforces secure transport, SSL Mode must be enabled in Databrain.
- SSH Tunnel (If Required): If your CockroachDB cluster is inside a private network:
- SSH Host: SSH endpoint of the bastion/jump server
- SSH Port: 22
- Username: SSH username
- Private Key: Private key used for SSH authentication
- Ensure:
- Databrain IP is whitelisted
- The SSH server can access the CockroachDB cluster internally
Permissions Checklist:
- Whitelisted Databrain IP
- USAGE on schema
- SELECT on tables
- Default privileges for future tables (recommended)
- Permission to read
information_schema
Locating the Configuration Details in CockroachDB
Host:- For CockroachDB Cloud: Available in your cluster connection string.
- For self-hosted: IP address or DNS of the CockroachDB node/load balancer.
- You can find it in:
- CockroachDB Cloud console → Connect → SQL Connection string
- Default CockroachDB SQL port:
26257 - Check your cluster configuration if customized.
- Connect using:
- List users:
- Or consult your database administrator.
- CockroachDB does not display passwords.
- If forgotten, reset it:
- List schemas:
- Check cluster settings:
- In CockroachDB Cloud, SSL is enabled by default.

