Connect FineBI to AnalyticDB for MySQL to analyze and visualize your data warehouse data. Once connected, you can filter, group, add columns, set fields, sort, and build dashboards directly on live data.
Prerequisites
Before you begin, make sure you have:
FineBI 5.0 or later — the version that supports real-time data (not the standard version from the FineBI official website). Contact FineBI technical support to get this version. For version compatibility details, see Compatibility overview
MySQL Connector/J installed on the FineBI host machine
If this is your first time installing FineBI, you also need:
A MySQL server (for example, ApsaraDB RDS for MySQL) to store FineBI metadata. FineBI requires an external MySQL database — it cannot use AnalyticDB for MySQL for this purpose
If you plan to connect over the Internet, you also need:
A public endpoint for your AnalyticDB for MySQL cluster. See Apply for or release a public endpoint
Configure an external MySQL database
Skip this section if you have already installed and configured FineBI. Go directly to Connect to the AnalyticDB for MySQL database.
FineBI stores its own metadata in an external MySQL database. Complete this configuration before connecting to AnalyticDB for MySQL.
Start FineBI.
Click the server URL and follow the on-screen instructions to configure Account Settings.
Click Next Step. In the External Database section, click Configure Database.
On the External Database Configuration page, fill in the MySQL server details:
Enter the MySQL server connection details here — not the AnalyticDB for MySQL details.
Parameter Description Database type Select MySQL from the drop-down list Driver Select com.mysql.jdbc.Driverfrom the drop-down listDatabase name The database that will store FineBI metadata. After connection, FineBI automatically runs CREATE DATABASE finedb;to create this databaseHost Address of the MySQL server (local or remote) Port number Default: 3306Username Account created on the MySQL server Password Password for the account URL Generated automatically by the system Click Enable New Database to import FineBI metadata into the MySQL database.
After the import completes, click Logon to log in to the MySQL server.
Connect to the AnalyticDB for MySQL database
Start FineBI. In the left-side navigation pane, choose Management System > Database Endpoint > Data Endpoint Management > Create Database Endpoint > All > AnalyticDB.

In the dialog box, configure the connection parameters:
Parameter Description Data connection name A descriptive name for this connection, used in Data Preparation later Driver Select com.mysql.jdbc.Driverfrom the drop-down listDatabase name The name of the AnalyticDB for MySQL database Host The public endpoint or VPC endpoint of your AnalyticDB for MySQL cluster. Find this on the Cluster Information page in the AnalyticDB for MySQL console Port 3306Username A privileged account or standard account for the AnalyticDB for MySQL cluster Password Password for the account 
Click Test to verify the connection. After the test succeeds, click Save in the upper-right corner.
Create a table
After connecting FineBI to AnalyticDB for MySQL, add tables to a business package so they are available for analysis and dashboard display.
In the left-side navigation pane, choose Data Preparation > Real-time Data > Business Package > Create Table.
Select the AnalyticDB for MySQL connection you configured, then choose a table type:
Database table: Add tables directly from the AnalyticDB for MySQL database
SQL dataset: Write a SQL query to generate a custom dataset for analysis

Self-service dataset: Add derived datasets on top of database tables or SQL datasets
Select the base table fields. You can then apply operations such as filtering, grouping, summarizing, adding columns, and merging.

Example: Market basket analysis dashboard
This example shows how to use FineBI with AnalyticDB for MySQL to build a market basket analysis dashboard. Market basket analysis identifies relationships between products by examining customer purchase patterns.
Step 1: Download the sample data
Download the Summary table of commodity sales file.
Step 2: Create a table in AnalyticDB for MySQL
Design the table with the distribution key and partition key suited to market basket analysis:
Use
Document Noas the distribution key. Purchase data is distributed relatively randomly by document number, and JOIN operations in basket analysis are performed on document numbers.Use
Dateas the partition key (level-2 partition). No data is imported to this column, so a date partition keeps the schema flexible.Set the lifecycle to
100.
Run the following statement to create the table:
Create Table `demo_sales` (
'Date' date,
'City' varchar,
'Document No' varchar,
'Store name' varchar,
'Commodity class' varchar,
'Commodity name' varchar,
'Province' varchar,
'Cost' double,
'Gross profit' double
'Quantity' bigint,
'Sales' double,
) DISTRIBUTED BY HASH ('Document No')
PARTITION BY VALUE ('Date') LIFECYCLE 100
INDEX_ALL='Y' STORAGE_POLICY='COLD' COMMENT='Summary table of merchandise sales'For more information about table schema design, see Table schema design.
Step 3: Import the sample data
Use Kettle to import the local Excel data into the AnalyticDB for MySQL demo_sales table. For instructions, see Use Kettle to import data to Data Warehouse Edition.
After the import completes, run the following query to verify the data:
SELECT COUNT(*) FROM demo_ordersThe query returns 40514, confirming that all records were imported.
Step 4: Create self-service datasets in FineBI
In the navigation pane, choose Data Preparation > Real-time Data. Add a business package named
adb.In the business package, create a self-service dataset and select the
AnalyticDB connection_demo_salesfields (all fields of thedemo_salestable in AnalyticDB for MySQL).
Step 5: Build the dashboard
Add data to the dataset by following the examples in the FineBI documentation to generate the market basket analysis dashboard.
Troubleshooting
No real-time data option in Data Preparation
Symptom: The Real-time Data option is missing from the Data Preparation hierarchy tree.
Cause: The standard version downloaded from the FineBI official website does not support direct connections to AnalyticDB for MySQL.
Solution: Contact FineBI technical support to obtain the version that supports real-time data.
External database not configured during initial setup
Symptom: FineBI initialized without an external database, and you now need to configure one.
Solution:
Start the data-based decision system. Choose Management System > System Management.
On the General tab, click To Be Configured.
Enter the external database parameters.
Click Enable New Database.
External MySQL database configured, but data import fails
Symptom: The external database connection succeeds, but importing FineBI metadata fails.
Cause: Typically a version or encoding mismatch. FineBI supports MySQL 5.x and requires the utf8 character set.
Solution:
Check whether your MySQL version is 5.x. For details, see Configure external MySQL database.
Check whether the MySQL database uses the
utf8(UTF-8 unicode) character set. If not, create a new database with the correct encoding:CREATE DATABASE finedb CHARACTER SET utf8
Connection to AnalyticDB for MySQL fails during external database setup
Symptom: You configured AnalyticDB for MySQL as the external database, but the connection fails.
Cause: The external database must be a MySQL database — not an AnalyticDB for MySQL database.
Solution: Reconfigure the external database using a MySQL server, such as ApsaraDB RDS for MySQL.
Data not synchronized between FineBI and AnalyticDB for MySQL
Symptom: Changes in AnalyticDB for MySQL are not reflected in FineBI.
Solution: See Section 3.2 in the FineBI real-time data documentation for synchronization settings.
No data displayed after updating data
Symptom: After updating data, no data appears — either in a single row or an entire column.
To diagnose the issue:
If no data appears in a single row: The calculation result for that row may be
null.If no data appears in an entire column and a function is applied to that column: The function may be incompatible with AnalyticDB for MySQL.
Solution: If a column function is causing the issue, contact AnalyticDB for MySQL technical support.
Cannot preview or save data
Symptom: Previewing or saving data fails with an error message.
To diagnose the issue, check the error message format:
Error message contains a string of numbers: This is a process ID from AnalyticDB for MySQL. Provide the process ID to AnalyticDB for MySQL technical support for troubleshooting.

Error message contains only an error code: The error originated in FineBI. Contact FineBI technical support.
If neither pattern matches, check whether a function is applied to a column with incompatible data types. For example, AnalyticDB for MySQL returns an error when Chinese characters in a city column are converted to a numeric value for absolute value calculations.