Connect to Yugabyte Cloud clusters Beta
Connect to your YugabyteDB clusters in Yugabyte Cloud using Yugabyte Cloud shells, remote clients, and third party clients.
YSQL shell (ysqlsh
)
Use the YSQL cloud shell
To access the YSQL cloud shell, follow these steps:
- Go to your cluster by clicking Clusters > Go to cluster.
- Click Connect (above the dashboard). The Connection Info window appears.
- Select YSQL Shell and then click Run in Cloud Shell. The YSQL shell prompt appears in a separate page and is ready to use.
ysqlsh (11.2-YB-2.2.0.0-b0)
Type "help" for help.
yugabyte=#
Related information:
- ysqlsh — Overview of the command line interface (CLI), syntax, and commands.
- YSQL API — Reference for supported YSQL statement, data types, functions, and operators.
Connect using a remote YSQL shell
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 credentials use COPY to copy a generated command that you can use to access the YCQL shell. The generated command includes flags specifying the 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:
PGPASSWORD=sx73qlpc ./bin/ysqlsh -h 35.236.85.97 -p 12201 -U admin -d yugabyte
-
Change directories to the Yugabyte home directory.
-
Paste and run the generated command saved in step 2.
$ PGPASSWORD=sx73qlpc ./bin/ysqlsh -h 35.236.85.97 -p 12201 -U admin -d yugabyte
ysqlsh (11.2-YB-2.1.0.0-b0) Type "help" for help. yugabyte=#
The local YSQL shell (ysqlsh
) opens connected to the remote cluster.
YCQL shell (ycqlsh
)
Use the YCQL cloud shell
To access the YCQL cloud shell, follow these steps:
- Go to your cluster by clicking Clusters > Go to cluster.
- Click Connect (above the dashboard). The Connection Info window appears.
- Select YCQL Shell and then click Run in Cloud Shell. The YCQL shell prompt appears in a separate page and is ready to use.
Connected to local cluster at acd4d7803e26911ea85700affa0900f1-1535195171.us-west-2.elb.amazonaws.com:12600.
[ycqlsh 5.0.1 | Cassandra 3.9-SNAPSHOT | CQL spec 3.4.2 | Native protocol v4]
Use HELP for help.
admin@ycqlsh>
Related information:
- ycqlsh — Overview of the command line interface (CLI), syntax, and commands.
- YCQL API — Reference for supported YCQL statement, data types, and functions.
Connect using a remote YCQL shell
Follow these steps to connect to your remote cluster using the YCQL shell (ycqlsh
):
-
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 credentials use COPY to copy a generated command that you can use to access the YCQL shell. The generated command includes flags specifying the 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:
./bin/ycqlsh 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.
$ ./bin/ycqlsh 35.236.85.97 12200 -u admin -p sx73qlpc
Connected to local cluster at 35.236.85.97:12200. [ycqlsh 5.0.1 | Cassandra 3.9-SNAPSHOT | CQL spec 3.4.2 | Native protocol v4] Use HELP for help. admin@ycqlsh>
The local YCQL shell (ycqlsh
) 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 steps are included for the following tools: