# Connecting to `TiDB` Cluster in the `TiDB Cloud`

__*TiDB Cloud Cluster Connection*__
__*zz-BGL*__

+ Connecting to `TiDB Dedicated`
  + Standard connection
  + Private endpoint with AWS or GCP
  + VPC peering
  + Chat2Query (beta)
  + SQL Shell
+ Connecting to `TiDB Serverless`
  + Standard connections
  + Data Service (beta)
  + Serverless Driver (beta)

-------------------------------------------------------------
To connect to `TiDB Dedicated`, you can use the following methods:
+ Connect via standard connection: The standard 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.
+ Connect via private endpoint with AWS: For TiDB Dedicated clusters hosted on AWS, private endpoint connection provides a private endpoint to allow SQL clients in your VPC to securely access services over AWS PrivateLink, which provides highly secure and one-way access to database services with simplified network management.
+ Connect via private endpoint with Google Cloud: For TiDB Dedicated clusters hosted on Google Cloud, private endpoint connection provides a private endpoint to allow SQL clients in your VPC to securely access services over Google Cloud Private Service Connect, which provides highly secure and one-way access to database services with simplified network management.
+ Connect via VPC peering: 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.
+ Connect via Chat2Query (beta): TiDB Cloud is powered by artificial intelligence (AI). If your cluster is hosted on AWS and the TiDB version of the cluster is v6.5.0 or later, you can use Chat2Query (beta), an AI-powered SQL editor in the TiDB Cloud console, to maximize your data value. In Chat2Query, you can either simply type -- followed by your instructions to let AI generate SQL queries automatically or write SQL queries manually, and then run SQL queries against databases without a terminal. You can find the query results in tables intuitively and check the query logs easily.
+ Connect via SQL Shell: to try TiDB SQL and test out TiDB's compatibility with MySQL quickly, or administer user privileges.

To connect to `TiDB Serverless`, you can use the following methods:
+ Direct connections: Direct connections mean the MySQL native connection system over TCP. You can connect to your TiDB Serverless cluster using any tool that supports MySQL connection, such as MySQL client.
+ Data Service (beta): TiDB Cloud provides a Data Service feature that enables you to connect to your TiDB Serverless cluster via an HTTPS request using a custom API endpoint. Unlike direct connections, Data Service accesses TiDB Serverless data via a RESTful API rather than raw SQL.
+ Serverless Driver (beta): TiDB Cloud provides a serverless driver for JavaScript, which allows you to connect to your TiDB Serverless cluster in edge environments with the same experience as direct connections.