Project: YugabyteDB (App Definition and Development / Database)
File: connect-client-shell.md

title: Connect via client shells linkTitle: Client shell description: Connect to YugabyteDB Managed clusters from your desktop using a client shell headcontent: Connect to YugabyteDB Managed databases from your desktop menu: preview_yugabyte-cloud: identifier: connect-client-shell parent: cloud-connect weight: 20 type: docs Connect to your YugabyteDB cluster database from your desktop using the YugabyteDB and client shells installed on your computer. Because YugabyteDB is compatible with PostgreSQL and Cassandra, you can also use and third-party tools to connect. When connecting via a Yugabyte client shell, ensure you are running the latest versions of the shells (Yugabyte Client 2.6 or later). See in the FAQ for details. Before you can connect a desktop client to a YugabyteDB Managed cluster, you need to do the following: Configure network access Download the cluster certificate Before you can connect using a shell or other client, you need to add your computer to the cluster IP allow list. By default, clusters deployed in a VPC do not expose any publicly-accessible IP addresses. To add public IP addresses, enable on the cluster Settings > Network Access tab. Alternatively, use the instead. For more information, refer to . YugabyteDB Managed clusters have TLS/SSL (encryption in-transit) enabled. You need to download the cluster certificate to your computer. For information on SSL in YugabyteDB Managed, refer to . Use the ysqlsh and ycqlsh shells to connect to and interact with YuagbyteDB using the YSQL and YCQL APIs respectively. You can download and install the YugabyteDB client shells and connect to your database using the following steps for either YSQL or YCQL. <ul class="nav nav-tabs nav-tabs-yb"> <li > <a href="#ysqlsh" class="nav-link active" id="ysqlsh-tab" data-toggle="tab" role="tab" aria-controls="ysqlsh" aria-selected="true"> <i class="icon-postgres" aria-hidden="true"></i> ysqlsh </a> </li> <li> <a href="#ycqlsh" class="nav-link" id="ycqlsh-tab" data-toggle="tab" role="tab" aria-controls="ycqlsh" aria-selected="false"> <i class="icon-cassandra" aria-hidden="true"></i> ycqlsh </a> </li> </ul> <div class="tab-content"> <div id="ysqlsh" class="tab-pane fade show active" role="tabpanel" aria-labelledby="ysqlsh-tab"> {{% includeMarkdown "connect/ysql.md" %}} </div> <div id="ycqlsh" class="tab-pane fade" role="tabpanel" aria-labelledby="ycqlsh-tab"> {{% includeMarkdown "connect/ycql.md" %}} </div> </div> To connect using , first download the CA certificate for your cluster by clicking Connect, selecting YugabyteDB Client Shell, and clicking Download CA Cert. Then use the following connection string: ```sh psql --host=<HOST_ADDRESS> --port=5433 \ --username=<DB USER> \ --dbname=yugabyte \ --set=sslmode=verify-full \ --set=sslrootcert=<ROOTCERTPATH> ``` Replace the following: `<HOST_ADDRESS>` with the value for host as shown under Connection Parameters on the Settings > Infrastructure tab for your cluster. `<DB USER>` with your database username. `yugabyte` with the database name, if you're connecting to a database other than the default (yugabyte). `<ROOTCERTPATH>` with the path to the root certificate on your computer. For information on using other SSL modes, refer to . Because YugabyteDB is compatible with PostgreSQL and Cassandra, you can use third-party clients to connect to your YugabyteDB clusters in YugabyteDB Managed. To connect, follow the client's configuration steps for PostgreSQL or Cassandra, and use the following values: host as shown under Connection Parameters on the Settings > Infrastructure tab for your cluster. port 5433 for YSQL, 9042 for YCQL. database name; the default YSQL database is yugabyte. username and password of a user with permissions for the database; the default user is admin. Your client may also require the use of the cluster's certificate. Refer to . For detailed steps for configuring popular third party tools, see . Overview of the command line interface (CLI), syntax, and commands. Reference for supported YSQL statements, data types, functions, and operators. Overview of the command line interface (CLI), syntax, and commands. Reference for supported YCQL statements, data types, functions, and operators.