📣
TiDB Cloud Essential is now in public preview. Try it out →

Connect to Your TiDB Cloud Starter or Essential Instance



This document describes how to connect to your TiDB Cloud Starter or TiDB Cloud Essential instance.

Network connection methods

After your TiDB Cloud Starter or TiDB Cloud Essential instance is created on TiDB Cloud, you can connect to it via one of the following methods:

  • Direct connections

    Direct connections mean the MySQL native connection system over TCP. You can connect to your TiDB Cloud Starter or Essential instance 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 Cloud Starter instance hosted on AWS via an HTTPS request using a custom API endpoint. Unlike direct connections, Data Service accesses your TiDB Cloud Starter or Essential instance 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 Cloud Starter or TiDB Cloud Essential instance in edge environments with the same experience as direct connections.

In the preceding connection methods, you can choose your desired one based on your needs:

Connection methodUser interfaceScenario
Direct connectionsSQL/ORMLong-running environment, such as Java, Node.js, and Python.
Data ServiceRESTful APIAll browser and application interactions.
Serverless DriverSQL/ORMServerless and edge environments such as Vercel Edge Functions and Cloudflare Workers.

Network

There are two network connection types for TiDB Cloud Starter and TiDB Cloud Essential:

  • Private endpoint (recommended)

    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.

  • Public endpoint

    The standard connection exposes a public endpoint, so you can connect to your TiDB Cloud Starter or Essential instance via a SQL client from your laptop.

    TiDB Cloud Starter and TiDB Cloud Essential require TLS connections, which ensures the security of data transmission from your applications to TiDB Cloud Starter or Essential instances.

The following table shows the network you can use in different connection methods:

Connection methodNetworkDescription
Direct connectionsPublic or private endpointDirect connections can be made via both public and private endpoints.
Data Service (beta)/Accessing TiDB Cloud Starter hosted on AWS via Data Service (beta) does not need to specify the network type.
Serverless Driver (beta)Public endpointServerless Driver only supports connections via public endpoint.

What's next

After you have successfully connected to your TiDB Cloud Starter or Essential instance, you can explore SQL statements with TiDB.

Was this page helpful?