title | summary |
---|---|
Connect to Your TiDB Cloud Dedicated Cluster |
Learn how to connect to your TiDB Cloud Dedicated cluster via different methods. |
This document introduces the methods to connect to your TiDB Cloud Dedicated cluster.
Tip:
To learn how to connect to a TiDB Cloud Serverless cluster, see Connect to Your TiDB Cloud Serverless Cluster.
After your TiDB Cloud Dedicated cluster is created on TiDB Cloud, you can connect to it via one of the following methods:
-
Direct connections
Direct connections use the MySQL native connection system over TCP. You can connect to your TiDB Cloud Dedicated cluster using any tool that supports MySQL connections, such as the MySQL Command-Line Client. TiDB Cloud also provides SQL Shell, which enables you to try TiDB SQL, test out TiDB's compatibility with MySQL quickly, and manage user privileges.
TiDB Cloud Dedicated provides three network connection types:
-
The public connection exposes a public endpoint with traffic filters, so you can connect to your TiDB cluster via a SQL client from your laptop. You can connect to your TiDB clusters using TLS, which ensures the security of data transmission from your applications to TiDB clusters. For more information, see Connect to TiDB Cloud Dedicated via Public Connection.
-
Private endpoint (recommended)
Private endpoint connection provides a private endpoint to allow SQL clients in your VPC to securely access TiDB Cloud Dedicated clusters. This uses the private link service provided by different cloud providers, which provides highly secure and one-way access to database services with simplified network management.
- For TiDB Cloud Dedicated clusters hosted on AWS, the private endpoint connection uses AWS PrivateLink. For more information, see Connect to a TiDB Cloud Dedicated Cluster via Private Endpoint with AWS.
- For TiDB Cloud Dedicated clusters hosted on Google Cloud, the private endpoint connection uses Google Cloud Private Service Connect. For more information, see Connect to a TiDB Cloud Dedicated Cluster via Google Cloud Private Service Connect.
-
If you want lower latency and more security, set up VPC peering and connect via a private endpoint using a VM instance on the corresponding cloud provider in your cloud account. For more information, see Connect to TiDB Cloud Dedicated via VPC Peering.
-
-
Note:
To use SQL Editor on TiDB Cloud Dedicated clusters, contact TiDB Cloud support.
If your cluster is hosted on AWS and the TiDB version of the cluster is v6.5.0 or later, you can use the AI-assisted SQL Editor in the TiDB Cloud console to maximize your data value.
In SQL Editor, you can either write SQL queries manually or simply press ⌘ + I on macOS (or Control + I on Windows or Linux) to instruct Chat2Query (beta) to generate SQL queries automatically. This enables you to run SQL queries against databases without a local SQL client. You can intuitively view the query results in tables or charts and easily check the query logs.
After you have successfully connected to your TiDB cluster, you can explore SQL statements with TiDB.