| title | Connect to {{{ .starter }}} or Essential via Public Endpoint |
|---|---|
| summary | Learn how to connect to your {{{ .starter }}} or {{{ .essential }}} cluster via public endpoint. |
This document describes how to connect to your {{{ .starter }}} or {{{ .essential }}} cluster via a public endpoint, using a SQL client from your computer, as well as how to disable a public endpoint.
Tip:
To learn how to connect to a TiDB Cloud Dedicated cluster via public endpoint, see Connect to TiDB Cloud Dedicated via Public Connection.
To connect to a {{{ .starter }}} or {{{ .essential }}} 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 connection type as
Public, and select your preferred connection method and operating system to get the corresponding connection string.Note:
-
Keeping the connection type as
Publicmeans the connection is via standard TLS connection. For more information, see TLS Connection to {{{ .starter }}} or Essential. -
If you choose Private Endpoint in the Connection Type drop-down list, it means that the connection is via private endpoint. For more information, see the following documents:
Note:
- Keeping the connection type as
Publicmeans the connection is via standard TLS connection. For more information, see TLS Connection to {{{ .starter }}} or Essential. - If you choose Private Endpoint in the Connection Type drop-down list, it means that the connection is via private endpoint. For more information, see Connect to {{{ .starter }}} or Essential via AWS PrivateLink.
-
-
TiDB Cloud lets you create branches for your {{{ .starter }}} or {{{ .essential }}} cluster. After a branch is created, you can choose to connect to the branch via the Branch drop-down list.
mainrepresents the cluster itself. -
If you have not set a password yet, click Generate 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 {{{ .starter }}} or {{{ .essential }}} 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. Your client IP must be in the allowed IP rules of the public endpoint of your cluster. For more information, see Configure {{{ .starter }}} or Essential Firewall Rules for Public Endpoints.
If you do not need to use a public endpoint of a {{{ .starter }}} or {{{ .essential }}} cluster, you can disable it to prevent connections from the internet:
-
Navigate to the Clusters page, and then click the name of your target cluster to go to its overview page.
-
In the left navigation pane, click Settings > Networking.
-
On the Networking page, click Disable. A confirmation dialog is displayed.
-
Click Disable in the confirmation dialog.
After disabling the public endpoint, the Public entry in the Connection Type drop-down list of the connect dialog is disabled. If users are still trying to access the cluster from the public endpoint, they will get an error.
Note:
Disabling the public endpoint does not affect existing connections. It only prevents new connections from the internet.
You can re-enable the public endpoint after disabling it:
-
Navigate to the Clusters page, and then click the name of your target cluster to go to its overview page.
-
In the left navigation pane, click Settings > Networking.
-
On the Networking page, click Enable.
After you have successfully connected to your TiDB cluster, you can explore SQL statements with TiDB.