- Quick Start
- Use Your Cluster
- Connect to Your TiDB Cluster
- Set Up VPC Peering Connections
- Monitor a TiDB Cluster
- Scale a TiDB Cluster
- Use an HTAP Cluster
- Backup and Restore Data
- Tune Performance
- Upgrade a TiDB Cluster
- Delete a TiDB Cluster
- Migrate Data
- Manage User Access
TiDB Cloud provides an easy way to host and manage your data in the cloud. This tutorial guides you through signing up, creating a cluster, connecting to a cluster, and migrating data from MySQL.
Sign up and log in to TiDB Cloud.
Visit https://tidbcloud.com/signup to sign up for a TiDB Cloud account.
If you have already signed up, visit https://tidbcloud.com and log in either using your registered email and password, or Google account.
Select a cloud provider.
Click the cloud service provider icon on the left of the top navigation bar, and select your preferred cloud provider. The existing options are Amazon Web Services and Google Cloud.
Click Create a Cluster, set a Cluster Name and a Root Password.
Confirm your Cloud Provider and select Region.
Select Cluster Tier and the number of nodes.
The selected cluster tier will determine the throughput and performance of your clusters. Once created, you cannot change the cluster tier.
Select Cluster Tier from the following options.
Free trial users for TiDB Cloud Public Preview can select only the T3.standard cluster tier. See Select Your Cluster Tier for details.
Default recommended setup for general Online Transactional Processing (OLTP) production environments.
Hybrid Transaction/Analytical Processing (HTAP) cluster setup to store both transactional and analytical data in the same cluster, with real time replication between the row store and columnar store. This cluster consists of TiKV and TiFlash, a columnar storage designed for analytical processing.
Select the number of nodes by clicking the plus or the minus sign.
Free trial users cannot increase or decrease number of nodes.
Your TiDB Cloud cluster will be created in approximately 5-15 minutes.
After your TiDB cluster is created, you can connect to your TiDB cluster via Standard connection. See Connect to Your TiDB Cluster for details.
To connect to your TiDB cluster via standard connection, perform the following steps:
Navigate to the TiDB Clusters page and find your newly created cluster.
Click Connect. The Connect to TiDB dialog displays.
Create the traffic filter for the cluster.
The traffic filter is a list of IPs and CIDR addresses that are allowed to access TiDB Cloud via a SQL client. If it is the first time that you connect to the cluster, the traffic filter is empty by default. Perform the following sub-steps to add one. If the traffic filter is already set, skip this step.
Click one of the following buttons to add some rules quickly.
- Add Your Current IP Address
- Add Rules from Default Set
- Allow Access from Anywhere
Provide an optional description for the newly added IP address or CIDR range.
Click Create Filter to confirm the changes.
Use a SQL client to connect to TiDB.
mysql -u root -h <endpoint> -P 4000 -p
Now you can explore SQL with TiDB.
You can import sample data using the UI import tool, or import your data using TiDB Lightning.
On the TiDB Cloud console, click Import in the upper right of the pane of the cluster that you want to import data into. The Data Import page displays.
For Data Source Type, select AWS S3.
In the Bucket URL field, enter the sample data URL
For Bucket Region, select US West (Oregon). The sample data bucket is hosted in the US West (Oregon) region.
For Data Format, select TiDB Dumpling.
For Target Database, enter
rootin the Username field, and enter the root password you have set when you created the cluster in the Password field.
If you have created a custom user and have the enough permissions, you can also use the name of the newly created user and the corresponding password.
Leave the DB/Tables Filter field blank.
Click Import. Then the sample data starts being imported.
Once the cluster finishes the data importing process, you will get the sample data in your database.
You can run some queries to check the result, for example:
Get the trip records starting at "12th & U St NW":
use bikeshare; select * from `trips` where start_station_name='12th & U St NW' limit 10;
Get the trip records with electric bikes:
use bikeshare; select * from `trips` where rideable_type='electric_bike' limit 10;