This topic describes how to add an AnalyticDB for MySQL 3.0 data source.
Prerequisites
An Alibaba Cloud AnalyticDB for MySQL 3.0 database is created.
You have the account credentials (username and password) for the AnalyticDB for MySQL 3.0 database.
Limitations
Only workspace administrators and developers can add data sources.
Procedure
Add IP addresses to the whitelist.
To connect to an AnalyticDB for MySQL 3.0 database, you must first add Quick BI's IP addresses to its whitelist. For instructions, see Configure a whitelist.
Log on to the Quick BI console.
Follow the steps shown in the figures to add a data source.
Go to the data source creation page.

For Database Version, select Alibaba AnalyticDB for MySQL 3.0.

In the Add AnalyticDB for MySQL 3.0 Data Source dialog box, select an engine type and configure the parameters.
XIHE Engine (MPP)
Parameter
Description
Display name
A unique, descriptive name for the data source.
The name cannot contain special characters or leading or trailing spaces.
Database address
The public endpoint of the AnalyticDB for MySQL 3.0 database. For a VPC data source, use the internal endpoint instead.
Log on to the AnalyticDB for MySQL console to get the database address from the Connection Information section. Example: am-xxxxxxxxxxxxxxxxxxxx.ads.aliyuncs.com
Port
The port number of the database. The default value is 3306.
Database
The name of the database to connect to.
Account and password
The account and password for the database. Ensure that the account has the CREATE, INSERT, UPDATE, and DELETE permissions on the tables in the database.
VPC data source
If the database is in an Alibaba Cloud Virtual Private Cloud (VPC), select VPC data source and configure the following parameters.
Purchaser AccessKey ID and Purchaser AccessKey Secret: The AccessKey ID and AccessKey Secret of an account that has permission to access the destination database. Ensure that the account has the Read permission on the destination instance. If the account also has the Write permission, the system automatically adds the required IP addresses to the whitelist. Otherwise, you must add them manually. For more information, see Create a custom policy.
You can obtain the AccessKey ID and AccessKey Secret from the RAM console. For more information, see Obtain an AccessKey.
Instance ID and Region: The instance ID and region of the database.
Find the instance ID and region in the AnalyticDB for MySQL console.
NoteIf you select VPC data source, you must enter the internal endpoint and port in the Database address and Port fields.
Initialize SQL
Select this option to configure initialization SQL statements.
These SQL statements automatically run each time a connection is established. Only SET statements are allowed. Separate multiple statements with a semicolon (;).
Spark Engine
Parameter
Description
Display name
The name of the data source to be displayed in the data source list.
The name cannot contain special characters or leading or trailing spaces.
Database address
The endpoint of the resource group in the AnalyticDB for MySQL 3.0 database. For a VPC data source, use the VPC endpoint of the resource group.
To find the resource group endpoint:
Log on to the AnalyticDB for MySQL console and click the target cluster's ID to open its details page.
In the left-side navigation pane, choose Cluster Management > Resource Management, and then click the Resource Groups tab.
In the Actions column of the target resource group, choose .
Port
The port number of the database. The default value is 3306.
Database
The name of the database that you want to connect to.
Resource group name
The name of the resource group in the database.
You can find the resource group name in the Cluster Management > Resource Management > Resource Group Management section of the AnalyticDB for MySQL console.
Account and password
The account and password for the database. Ensure that the account has the CREATE, INSERT, UPDATE, and DELETE permissions on the tables in the database.
Initialize SQL
Select this option to configure initialization SQL statements.
These SQL statements are automatically executed each time a connection to the data source is established. Only SET statements are allowed. Separate multiple statements with a semicolon (;).
Click Test Connection to verify the data source connection.

If the connection test is successful, click OK to add the data source.
Next Steps
After creating the data source, you can also create datasets to analyze data.
To add tables or custom SQL queries from your AnalyticDB for MySQL 3.0 data source to Quick BI, see Create a dataset.
To create charts for data analysis, see Create a dashboard and Overview of charts.
To use the drill-down feature for in-depth data analysis, see Step 3: Configure and display drill-down data.