📣

TiDB Cloud Serverless is now
TiDB Cloud Starter
! Same experience, new name.
Try it out →

TiDB Cloud Quick Start

Estimated completion time: 20 minutes

This tutorial guides you through an easy way to get started with TiDB Cloud.

Additionally, you can try out TiDB features on TiDB Playground.

Step 1: Create a TiDB cluster

TiDB Cloud Serverless (now Starter) is the best way to get started with TiDB Cloud. To create a TiDB Cloud Starter cluster, follow these steps:

  1. If you do not have a TiDB Cloud account, click here to sign up.

    You can sign up with your email and password to manage your password using TiDB Cloud, or choose to sign in with your Google, GitHub, or Microsoft account for single sign-on (SSO) to TiDB Cloud.

  2. Log in to your TiDB Cloud account.

    The Clusters page is displayed by default.

  3. For new sign-up users, TiDB Cloud automatically creates a default TiDB Cloud Starter cluster named Cluster0 for you.

    • To instantly try out TiDB Cloud features with this default cluster, proceed to Step 2: Try AI-assisted SQL Editor.

    • To create a new TiDB Cloud Starter cluster on your own, follow these steps:

      1. Click Create Cluster.

      2. On the Create Cluster page, Starter is selected by default. Select the cloud provider and target region for your cluster, update the default cluster name if necessary, and then click Create. Your TiDB Cloud Starter cluster will be created in approximately 30 seconds.

Step 2: Try AI-assisted SQL Editor

For TiDB Cloud Starter clusters hosted on AWS, you can use the built-in AI-assisted SQL Editor in the TiDB Cloud console to maximize your data value. 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.

  1. On the Clusters page, click a cluster name to go to its overview page, and then click SQL Editor in the left navigation pane.

  2. To try the AI capacity of TiDB Cloud, follow the on-screen instructions to allow PingCAP and AWS Bedrock to use your code snippets for research and service improvement, and then click Save and Get Started.

  3. In SQL Editor, press + I on macOS (or Control + I on Windows or Linux) to instruct Chat2Query (beta) to generate SQL queries automatically.

    For example, to create a new table test.t with two columns (column id and column name), you can type use test; to specify the database, press + I, type create a new table t with id and name as the instruction, and then press Enter to let AI generate a SQL statement accordingly.

    For the generated statement, you can accept it by clicking Accept and then further edit it if needed, or reject it by clicking Discard.

  4. Run the SQL queries.

      For macOS:

      • If you have only one query in the editor, press ⌘ + Enter or click Run to execute it.

      • If you have multiple queries in the editor, select the lines of the target queries with your cursor, and then press ⌘ + Enter or click Run to execute them sequentially.

      • To run all queries in the editor sequentially, press ⇧ + ⌘ + Enter, or select the lines of all queries with your cursor and click Run.

      For Windows or Linux:

      • If you have only one query in the editor, press Ctrl + Enter or click Run to execute it.

      • If you have multiple queries in the editor, select the lines of the target queries with your cursor, and then press Ctrl + Enter or click Run to execute them sequentially.

      • To run all queries in the editor sequentially, press Shift + Ctrl + Enter, or select the lines of all queries with your cursor and click Run.

    After running the queries, you can immediately see the query logs and results at the bottom of the page.

    To let AI generate more SQL statements, you can type more instructions as shown in the following example:

    use test; -- create a new table t with id and name CREATE TABLE `t` (`id` INT, `name` VARCHAR(255)); -- add 3 rows INSERT INTO `t` (`id`, `name`) VALUES (1, 'row1'), (2, 'row2'), (3, 'row3'); -- query all SELECT `id`, `name` FROM `t`;

    Step 3: Try guided tour on the console

    TiDB Cloud offers an interactive tutorial with carefully crafted sample datasets to help you quickly get started with TiDB Cloud. For TiDB Cloud Starter clusters hosted on AWS, you can try this tutorial to learn how to use TiDB Cloud for high-performance data analytics.

    1. Click the ? icon in the lower-right corner of the console and select Guided tour of SQL Editor.
    2. Choose a TiDB Cloud Starter cluster that you want to use for the tour, and click Import Dataset. The import process might take approximately one minute.
    3. Once the sample data is imported, follow the on-screen instructions to complete the tour.

    What's next

    Was this page helpful?