How do I connect JetBrains DataGrip to CockroachDB Serverless?

508 Views Asked by At

I'd like to use JetBrains DataGrip with CockroachDB Serverless.

How do I create a connection? I get errors that look like this:

[08004] FATAL: codeParamsRoutingFailed: missing cluster name in connection string.
2

There are 2 best solutions below

0
On BEST ANSWER

Use the following configuration to connect to CockroachDB Serverless from JetBrains DataGrip (or other JetBrains IDEs).

General configuration panel

The key tricky part is that you need to add the cluster name to the options parameter in the Advanced tab, as shown here. Replace cluster-name-1234 with your cluster name and ID, as shown on your CockroachDB Serverless Connect screen.

enter image description here

0
On

--cluster= Identifies your tenant cluster on a multi-tenant host. For example, funny-skunk-123. This option is deprecated. hostThe in the connection string now includes the tenant information.See screenshot