You can connect Quick BI to your TiDB database to analyze and visualize data. This topic describes how to add a user-created TiDB data source over a public network connection.
Prerequisites
You have created a TiDB database.
You have the username and password for your TiDB database.
Limitations
Quick BI supports TiDB version 7.1.3.
Procedure
Add IP addresses to the whitelist.
To connect to your user-created TiDB data source, you must add the IP addresses of Quick BI to the whitelist for the database.
Log on to the Quick BI console.
Follow the steps in Create a data source to navigate to the data source creation page.
On the User-Created Data Sources tab, select TiDB.

In the Configure Connection dialog box, configure the following parameters.

Parameter
Description
Display Name
The name for the data source connection.
The name cannot contain special characters or leading or trailing spaces.
Database Address
The IP address or domain name of the TiDB database.
Port
The port number of the database.
Database
The name of the database that you specified when you created the TiDB instance.
Username and Password
The username and password for the TiDB database.
Ensure that this user has
CREATE,INSERT,UPDATE, andDELETEpermissions on the tables that you want to access.VPC data source
Select this option to connect to a database in an Alibaba Cloud VPC. You must then provide the private IP address and port.
Select Instance if your database is deployed on an ECS instance. Select CLB if you are connecting through a Classic Load Balancer (CLB).
Instance
AccessKey ID: The AccessKey ID of the instance owner.
NoteEnsure that this AccessKey ID has
Readpermissions for the target instance. If it also hasWritepermissions for the corresponding security group, the system automatically adds the required IP addresses to the whitelist. Otherwise, you must add the IP addresses manually. For more information, see Create a custom RAM policy.For more information, see Create an AccessKey pair.
AccessKey Secret: The AccessKey secret that corresponds to the AccessKey ID.
For more information, see Create an AccessKey pair.
instance ID: The ID of the ECS instance. You can obtain this ID from the Instances page of the ECS console.
For more information, see View instance information.
region: The region where the ECS instance is located. You can find the region in the upper-left corner of the ECS console.
For more information, see View instance information.
CLB
AccessKey ID: The AccessKey ID of the CLB instance owner. You can obtain the AccessKey ID from the RAM console.
NoteEnsure that this account has
Readpermissions for the CLB instance.For more information, see View the AccessKey information of a RAM user.
AccessKey Secret: The AccessKey secret that corresponds to the AccessKey ID. The AccessKey secret is displayed only when you create it. If you lose the AccessKey secret, you must create a new one.
instance ID: The ID of the CLB instance. You can obtain this ID from the Instances page of the CLB console.
region: The region where the CLB instance is located. You can find the region in the upper-left corner of the Instances page in the CLB console.
Initialize SQL
Specify SQL statements to execute after a connection is established.
Only
SETstatements are allowed. Separate multiple statements with semicolons (;).Click Test Connection to verify the connection parameters.

After a successful connection test, click OK to add the data source.
Next steps
After you create the data source, you can create a dataset and start analyzing your data.
To add data tables or custom SQL queries from your TiDB database to Quick BI, see Create a dataset.
To add visualizations and analyze data, see Create a dashboard and Overview of chart types.
To drill down for in-depth data analysis, see Step 3: Configure and use the drill-down feature.