Connect to clusters Beta

You can connect to YugabyteDB clusters in Yugabyte Cloud with YugabyteDB clients and third party clients.

You can use the following YugabyteDB clients (locally installed) to connect to your remote clusters in Yugabyte Cloud:

NoteTo use the YugabyteDB CLIs to connect to your remote Yugabyte Cloud clusters, you must have a local installation ofYugabyteDB. If you do not have a local installation, see Install YugabyteDB.

Connect using the YSQL shell (ysqlsh)

Follow these steps to connect to your remote cluster using the YSQL shell (ysqlsh):

  • Log into Yugabyte Cloud and click Cluster in the navigation bar. The list of available clusters appears.
  • Click Go to cluster for your cluster. The Yugabyte Cloud Console appears.
  • Click Connect to get the user credentials you need to access the remote cluster. The Connect dialog appears with user credentialsuse COPY to copy a generated command that you can use to access the YCQL shell. The generated command includes options specifyingthe host (-h), port (-p), username (-U), and database (-d). To specify the password The generated command connects to the default database (yugabyte).Here’s an example of the generated command:
  1. ```sh
  2. PGPASSWORD=sx73qlpc ./bin/ysqlsh -h 35.236.85.97 -p 12201 -U admin -d yugabyte
  3. ```
  • Change directories to the Yugabyte home directory.
  • Paste and run the generated command saved in step 2.
  1. $ PGPASSWORD=sx73qlpc ./bin/ysqlsh -h 35.236.85.97 -p 12201 -U admin -d yugabyte
  1. ysqlsh (11.2-YB-2.1.0.0-b0)
  2. Type "help" for help.
  3. yugabyte=#

The local YSQL shell (ysqlsh) opens connected to the remote cluster.

Connect using the YCQL shell (cqlsh)

Follow these steps to connect to your remote cluster using the YCQL shell (cqlsh):

  • Log into Yugabyte Cloud and click Cluster in the navigation bar. The list of available clusters appears.
  • Click Go to cluster for your cluster. The Yugabyte Cloud Console appears.
  • Click Connect to get the user credentials you need to access the remote cluster. The Connect dialog appears with user credentialsuse COPY to copy a generated command that you can use to access the YCQL shell. The generated command includes options specifyingthe host (-h), port (-p), username (-U), and database (-d). To specify the password The generated command connects to the default database (yugabyte).

Here’s an example of the generated command:

  1. ./bin/cqlsh 35.236.85.97 12200 -u admin -p sx73qlpc
  • Change directories to the Yugabyte home directory.

  • Paste and run the generated command you copied in step 3.

  1. $ ./bin/cqlsh 35.236.85.97 12200 -u admin -p sx73qlpc
  1. Connected to local cluster at 35.236.85.97:12200.
  2. [cqlsh 5.0.1 | Cassandra 3.9-SNAPSHOT | CQL spec 3.4.2 | Native protocol v4]
  3. Use HELP for help.
  4. [email protected]>

The local YCQL shell (cqlsh) opens connected to the remote cluster.

Connect using third party clients

Because YugabyteDB is PostgreSQL-compatible, you can use third party PostgreSQL clients to connect to your YugabyteDB clusters in Yugabyte Cloud.To create connections to your cluster in Yugabyte Cloud, follow the client’s configuration steps for PostgreSQL, but use the values for host, port, username,and password available in the Connect dialog for your cluster.

To see the host, port, username, and password required to connect:

  • Click Clusters an then click Go to cluster for the cluster you want to connect to.
  • Click Connect. The Connect dialog appears, displaying the host, port, and user credentials for the default user (admin).
  • To get the user credentials for a different user, click Database Access and then click INFO for that user.For detailed steps for configuring popular third party tools, see Third party tools. In that section, configuration stepsare included for the following tools: