title | summary |
---|---|
Connect to TiDB Serverless via Public Endpoint |
Learn how to connect to your TiDB Serverless cluster via public endpoint. |
This document describes how to connect to your TiDB Serverless cluster via public endpoint. With the public endpoint, you can connect to your TiDB Serverless cluster via a SQL client from your laptop.
Tip:
To learn how to connect to a TiDB Dedicated cluster via public endpoint, see Connect to TiDB Dedicated via Standard Connection.
To connect to a TiDB Serverless cluster via public endpoint, take the following steps:
-
Navigate to the Clusters page, and then click the name of your target cluster to go to its overview page.
-
Click Connect in the upper-right corner. A connection dialog is displayed.
-
In the dialog, keep the default setting of the endpoint type as
Public
, and select your preferred connection method and operating system to get the corresponding connection string.Note:
- Keeping the endpoint type as
Public
means the connection is via standard TLS connection. For more information, see TLS Connection to TiDB Serverless. - If you choose Private in the Endpoint Type drop-down list, it means that the connection is via private endpoint. For more information, see Connect to TiDB Serverless via Private Endpoint.
- Keeping the endpoint type as
-
If you have not set a password yet, click Create password to generate a random password. The generated password will not show again, so save your password in a secure location.
-
Connect to your cluster with the connection string.
Note:
When you connect to a TiDB Serverless cluster, you must include the prefix for your cluster in the user name and wrap the name with quotation marks. For more information, see User name prefix.
After you have successfully connected to your TiDB cluster, you can explore SQL statements with TiDB.