Skip to content

Latest commit

 

History

History
115 lines (65 loc) · 7.18 KB

tidb-cloud-quickstart.md

File metadata and controls

115 lines (65 loc) · 7.18 KB
title summary category aliases
TiDB Cloud Quick Start
Sign up quickly to try TiDB Cloud and create your TiDB cluster.
quick start
/tidbcloud/beta/tidb-cloud-quickstart

TiDB Cloud Quick Start

Estimated completion time: 20 minutes

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

In addition, you can try out TiDB features on TiDB Playground.

Step 1. Create a TiDB cluster

TiDB Cloud Serverless Tier (Beta) is the best way to get started with TiDB Cloud. To create a free Serverless Tier cluster, take the following steps:

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

    For Google or GitHub users, you can also sign up with your Google or GitHub account. Your email address and password will be managed by Google or GitHub and cannot be changed using the TiDB Cloud console.

  2. Log in to your TiDB Cloud account.

    The plan selection page is displayed by default.

  3. On the plan selection page, click Get Started for Free in the Serverless Tier plan.

  4. On the Create Cluster page, Serverless Tier is selected by default. Update the default cluster name if necessary, and then select the region where you want to create your cluster.

  5. Click Create.

    The cluster creation process starts and your Serverless Tier cluster will be created in approximately 30 seconds.

Step 2. Try AI-powered Chat2Query (beta)

TiDB Cloud is powered by AI. 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.

  1. On the Clusters page, click your cluster name, and then click Chat2Query in the left navigation pane.

  2. To try TiDB Cloud AI capacity, follow the on-screen instructions to allow PingCAP and OpenAI to use your code snippets to research and improve the services, and then click Save and Get Started.

  3. In the editor, you can either simply type -- followed by your instructions to let AI generate SQL queries automatically or write SQL queries manually.

    Note:

    SQL queries generated by AI are not 100% accurate and might still need your further tweak.

  4. Run SQL queries.

    For macOS:

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

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

    • 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, to run it, press Ctrl + Enter or click Run.

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

    • 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 see the query logs and results immediately at the bottom of the page.

Step 3. Try Playground

After your TiDB Cloud cluster is created, you can also quickly start experimenting with TiDB using the pre-loaded sample data in TiDB Cloud Playground.

On the Clusters page, click the name of your newly created cluster to go to its overview page, and then click Playground in the left navigation pane.

Step 4. Load sample data

After trying Plaground, you can load sample data to your TiDB Cloud cluster. We provide Capital Bikeshare sample data for you to easily import data and run sample queries.

  1. On your cluster overview page, click Import in the left navigation pane.

  2. On the Import page, click Import Data in the upper-right corner, and then select From S3.

  3. Fill in the import parameters:

    • Data format: select SQL File
    • Bucket URI: s3://tidbcloud-samples/data-ingestion/
    • Role ARN: arn:aws:iam::385595570414:role/import-sample-access

    If the region of the bucket is different from your cluster, confirm the compliance of cross region. Click Next.

  4. Add the table filter rules if needed. For the sample data, you can skip this step. Click Next.

  5. On the Preview page, confirm the data to be imported and then click Start Import.

The data import process will take several minutes. When the data import progress shows Finished, you have successfully imported the sample data and the database schema to your database in TiDB Cloud.

What's next