- Docs Home
- About TiDB Cloud
- Get Started
- Develop Applications
- Overview
- Quick Start
- Build a TiDB Developer Cluster
- CRUD SQL in TiDB
- Build a Simple CRUD App with TiDB
- Example Applications
- Connect to TiDB
- Design Database Schema
- Write Data
- Read Data
- Transaction
- Optimize
- Troubleshoot
- Reference
- Cloud Native Development Environment
- Manage Cluster
- Plan Your Cluster
- Create a TiDB Cluster
- Connect to Your TiDB Cluster
- Set Up VPC Peering Connections
- Use an HTAP Cluster with TiFlash
- Scale a TiDB Cluster
- Upgrade a TiDB Cluster
- Delete a TiDB Cluster
- Use TiDB Cloud API (Beta)
- Migrate Data
- Import Sample Data
- Migrate Data into TiDB
- Configure Amazon S3 Access and GCS Access
- Migrate from MySQL-Compatible Databases
- Migrate Incremental Data from MySQL-Compatible Databases
- Migrate from Amazon Aurora MySQL in Bulk
- Import or Migrate from Amazon S3 or GCS to TiDB Cloud
- Import CSV Files from Amazon S3 or GCS into TiDB Cloud
- Import Apache Parquet Files from Amazon S3 or GCS into TiDB Cloud
- Troubleshoot Access Denied Errors during Data Import from Amazon S3
- Export Data from TiDB
- Back Up and Restore
- Monitor and Alert
- Overview
- Built-in Monitoring
- Built-in Alerting
- Third-Party Monitoring Integrations
- Tune Performance
- Overview
- Analyze Performance
- SQL Tuning
- Overview
- Understanding the Query Execution Plan
- SQL Optimization Process
- Overview
- Logic Optimization
- Physical Optimization
- Prepare Execution Plan Cache
- Control Execution Plans
- TiKV Follower Read
- Coprocessor Cache
- Garbage Collection (GC)
- Tune TiFlash performance
- Manage User Access
- Billing
- Reference
- TiDB Cluster Architecture
- TiDB Cloud Cluster Limits and Quotas
- TiDB Limitations
- SQL
- Explore SQL with TiDB
- SQL Language Structure and Syntax
- SQL Statements
ADD COLUMNADD INDEXADMINADMIN CANCEL DDLADMIN CHECKSUM TABLEADMIN CHECK [TABLE|INDEX]ADMIN SHOW DDL [JOBS|QUERIES]ALTER DATABASEALTER INDEXALTER TABLEALTER TABLE COMPACTALTER USERANALYZE TABLEBATCHBEGINCHANGE COLUMNCOMMITCHANGE DRAINERCHANGE PUMPCREATE [GLOBAL|SESSION] BINDINGCREATE DATABASECREATE INDEXCREATE ROLECREATE SEQUENCECREATE TABLE LIKECREATE TABLECREATE USERCREATE VIEWDEALLOCATEDELETEDESCDESCRIBEDODROP [GLOBAL|SESSION] BINDINGDROP COLUMNDROP DATABASEDROP INDEXDROP ROLEDROP SEQUENCEDROP STATSDROP TABLEDROP USERDROP VIEWEXECUTEEXPLAIN ANALYZEEXPLAINFLASHBACK TABLEFLUSH PRIVILEGESFLUSH STATUSFLUSH TABLESGRANT <privileges>GRANT <role>INSERTKILL [TIDB]MODIFY COLUMNPREPARERECOVER TABLERENAME INDEXRENAME TABLEREPLACEREVOKE <privileges>REVOKE <role>ROLLBACKSELECTSET DEFAULT ROLESET [NAMES|CHARACTER SET]SET PASSWORDSET ROLESET TRANSACTIONSET [GLOBAL|SESSION] <variable>SHOW ANALYZE STATUSSHOW [GLOBAL|SESSION] BINDINGSSHOW BUILTINSSHOW CHARACTER SETSHOW COLLATIONSHOW [FULL] COLUMNS FROMSHOW CREATE SEQUENCESHOW CREATE TABLESHOW CREATE USERSHOW DATABASESSHOW DRAINER STATUSSHOW ENGINESSHOW ERRORSSHOW [FULL] FIELDS FROMSHOW GRANTSSHOW INDEX [FROM|IN]SHOW INDEXES [FROM|IN]SHOW KEYS [FROM|IN]SHOW MASTER STATUSSHOW PLUGINSSHOW PRIVILEGESSHOW [FULL] PROCESSSLISTSHOW PROFILESSHOW PUMP STATUSSHOW SCHEMASSHOW STATS_HEALTHYSHOW STATS_HISTOGRAMSSHOW STATS_METASHOW STATUSSHOW TABLE NEXT_ROW_IDSHOW TABLE REGIONSSHOW TABLE STATUSSHOW [FULL] TABLESSHOW [GLOBAL|SESSION] VARIABLESSHOW WARNINGSSHUTDOWNSPLIT REGIONSTART TRANSACTIONTABLETRACETRUNCATEUPDATEUSEWITH
- Data Types
- Functions and Operators
- Overview
- Type Conversion in Expression Evaluation
- Operators
- Control Flow Functions
- String Functions
- Numeric Functions and Operators
- Date and Time Functions
- Bit Functions and Operators
- Cast Functions and Operators
- Encryption and Compression Functions
- Locking Functions
- Information Functions
- JSON Functions
- Aggregate (GROUP BY) Functions
- Window Functions
- Miscellaneous Functions
- Precision Math
- Set Operations
- List of Expressions for Pushdown
- TiDB Specific Functions
- Clustered Indexes
- Constraints
- Generated Columns
- SQL Mode
- Table Attributes
- Transactions
- Views
- Partitioning
- Temporary Tables
- Cached Tables
- Character Set and Collation
- Read Historical Data
- System Tables
mysql- INFORMATION_SCHEMA
- Overview
ANALYZE_STATUSCLIENT_ERRORS_SUMMARY_BY_HOSTCLIENT_ERRORS_SUMMARY_BY_USERCLIENT_ERRORS_SUMMARY_GLOBALCHARACTER_SETSCLUSTER_INFOCOLLATIONSCOLLATION_CHARACTER_SET_APPLICABILITYCOLUMNSDATA_LOCK_WAITSDDL_JOBSDEADLOCKSENGINESKEY_COLUMN_USAGEPARTITIONSPROCESSLISTREFERENTIAL_CONSTRAINTSSCHEMATASEQUENCESSESSION_VARIABLESSLOW_QUERYSTATISTICSTABLESTABLE_CONSTRAINTSTABLE_STORAGE_STATSTIDB_HOT_REGIONS_HISTORYTIDB_INDEXESTIDB_SERVERS_INFOTIDB_TRXTIFLASH_REPLICATIKV_REGION_PEERSTIKV_REGION_STATUSTIKV_STORE_STATUSUSER_PRIVILEGESVIEWS
- System Variables
- API Reference
- Storage Engines
- Dumpling
- Table Filter
- Troubleshoot Inconsistency Between Data and Indexes
- FAQs
- Release Notes
- Support
- Glossary
TiDB Cloud Quick Start
Estimated completion time: 20 minutes
This tutorial guides you through an easy way to get started with your TiDB Cloud. The content includes how to create a cluster, connect to a cluster, import data, and run queries.
Step 1. Create a TiDB cluster
You can either create a free Developer Tier cluster or a Dedicated Tier.
- Developer Tier
- Dedicated Tier
To create a free Developer Tier cluster, take the following steps:
If you do not have a TiDB Cloud account, click here to sign up for an account.
- For Google users, you can also sign up with Google. To do that, click Sign up with Google on the sign up page. Your email address and password will be managed by Google and cannot be changed using TiDB Cloud console.
- For GitHub users, you can also sign up with GitHub. To do that, click Sign up with GitHub on the sign up page. Your email address and password will be managed by GitHub and cannot be changed using TiDB Cloud console.
Log in to your TiDB Cloud account.
The plan selection page is displayed by default.
On the plan selection page, click Get Started for Free in the Developer Tier plan.
On the Create Cluster page, Developer Tier is selected by default. Update the default cluster name if necessary, and then select the region where you want to create your cluster.
Click Create.
The cluster creation process starts and the Security Settings dialog box is displayed.
In the Security Settings dialog box, set the root password and allowed IP addresses to connect to your cluster, and then click Apply.
Your TiDB Cloud cluster will be created in approximately 5 to 15 minutes.
To create a Dedicated Tier cluster, take the following steps:
If you do not have a TiDB Cloud account, click here to sign up for an account.
- For Google users, you can also sign up with Google. To do that, click Sign up with Google on the sign up page. Your email address and password will be managed by Google and cannot be changed using TiDB Cloud console.
- For GitHub users, you can also sign up with GitHub. To do that, click Sign up with GitHub on the sign up page. Your email address and password will be managed by GitHub and cannot be changed using TiDB Cloud console.
- For AWS Marketplace users, you can also sign up through AWS Marketplace. To do that, search for
TiDB Cloudin AWS Marketplace, subscribe to TiDB Cloud, and then follow the onscreen instructions to set up your TiDB Cloud account.
Log in to your TiDB Cloud account.
The plan selection page is displayed by default.
On the plan selection page, click Get Full Access Today in the Dedicated Tier plan.
On the Create a Cluster page, Dedicated Tier is selected by default. Update the default cluster name and port number if necessary, choose a cloud provider and a region, and then click Next.
NoteIf you want to get a 14-day free trial of TiDB Cloud Dedicated Tier first, see Perform a Proof of Concept (PoC) with TiDB Cloud.
If this is the first cluster of your current project and CIDR has not been configured for this project, you need to set the project CIDR, and then click Next. If you do not see the project CIDR field, it means that CIDR has already been configured for this project.
NoteWhen setting the project CIDR, avoid any conflicts with the CIDR of the VPC where your application is located. The CIDR of a project cannot be modified once it is set.
Configure the cluster size for TiDB, TiKV, and TiFlash (optional) respectively, and then click Next.
Confirm the cluster information on the page and also the billing information in the lower-left corner.
Click Add Credit Card in the lower-right corner to add a credit card for your account.
Click Create.
The cluster creation process starts and the Security Settings dialog box is displayed.
In the Security Settings dialog box, set the root password and allowed IP addresses to connect to your cluster, and then click Apply.
Your TiDB Cloud cluster will be created in approximately 5 to 15 minutes.
Step 2. Connect to your TiDB cluster
Navigate to the Clusters page.
In the area of your newly created cluster, click Connect in the upper-right corner. A connection dialog box is displayed.
TipAlternatively, you can also click the name of your newly created cluster on the Clusters page and click Connect in the upper-right corner.
Under Step 2: Connect with a SQL client in the dialog box, click the tab of your preferred connection method, and then connect to your cluster with the connection string.
Note- For Developer Tier clusters, when you connect to your cluster, you must include the prefix for your cluster in the user name and wrap the name with quotation marks. For more information, see User name prefix.
- TiDB Cloud is MySQL-compatible, so you can connect to your cluster using any MySQL client tools. We recommend using mysql — The MySQL Command-Line Client or mysql — The MySQL Command-Line Client from MariaDB.
After logging into your TiDB cluster, you can use the following SQL statement to validate the connection:
SELECT TiDB_version();If you see the release version information, you are ready to use your TiDB cluster.
Step 3. Import the sample data
We provide Capital Bikeshare sample data for you to easily import data and run sample queries.
Navigate to the Clusters page.
In the area of your newly created cluster, click Import Data in the upper-right corner. The Data Import Task page is displayed.
TipAlternatively, you can also click the name of your newly created cluster on the Clusters page and click Import Data in the upper-right corner.
Fill in the import parameters:
- AWS
- GCP
If your TiDB cluster is hosted by AWS (the Developer Tier is hosted by AWS by default), fill in the following parameters:
- Data Source Type:
AWS S3. - Bucket URL: enter the sample data URL
s3://tidbcloud-samples/data-ingestion/. - Data Format: select TiDB Dumpling.
- Setup Credentials: enter
arn:aws:iam::385595570414:role/import-sample-accessfor Role-ARN. - Target Cluster: fill in the Username and Password fields.
- DB/Tables Filter: leave this field blank.
If your TiDB cluster is hosted by GCP, fill in the following parameters:
- Data Source Type:
Google Cloud Stroage. - Bucket URL: enter the sample data URL
gcs://tidbcloud-samples-us-west1. - Data Format: select TiDB Dumpling.
- Target Cluster: fill in the Username and Password fields.
- DB/Tables Filter: leave this field blank.
Click Import.
A warning message about the database resource consumption is displayed. For a newly created cluster, you can ignore the warning message.
Click Confirm.
TiDB Cloud starts validating whether it can access the sample data in the specified bucket URL. After the validation is completed and successful, the import task starts automatically.
The data import process will take 5 to 10 minutes. When the data import progress bar shows Success, you successfully import the sample data and the database schema in your database.
Step 4. Query data
When the process of importing data is completed, you can start to run some queries in your Terminal:
Use the
bikesharedatabase and tables:USE bikeshare; SHOW tables;Check the structure of the
triptable:DESCRIBE trips;Check how many records exist in the
tripstable:SELECT COUNT(*) FROM trips;Check the entire trip history where the start station is "8th & D St NW":
SELECT * FROM trips WHERE start_station_name = '8th & D St NW';Show the least ten popular bicycle stations for picking up:
SELECT start_station_name, COUNT(ride_id) as count from `trips` GROUP BY start_station_name ORDER BY count ASC LIMIT 10;