All Products
Search
Document Center

AnalyticDB:Power BI

Last Updated:Mar 28, 2026

Connect Power BI to an AnalyticDB for MySQL cluster to run real-time data analytics on your cluster data.

Connection methods at a glance

Three connection methods are available. Choose based on the data access mode you need and the endpoint type you're connecting to.

MethodData access modeEndpoint typeRequirements
Custom connector (recommended)Import, DirectQueryADB MySQL endpointMySQL ODBC Driver 5.1.13, AnalyticDB.MySQL.mez
Built-in MySQL connectorImport onlyADB MySQL endpointMySQL Connector (.NET)
Spark JDBC endpointSpark JDBC endpointMicrosoft or Simba Spark ODBC Driver
The steps in this topic use Power BI Desktop 2.143.878.0 in English.

Prerequisites

Before you begin, make sure you have:

Connect using the custom connector

The custom connector supports both Import and DirectQuery modes and works with all AnalyticDB for MySQL endpoints.

Step 1: Install the MySQL ODBC driver

  1. Download and install the Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package MFC.

  2. Download and install version 5.1.13 of the MySQL ODBC Driver.

  3. Open ODBC Data Source Administrator (64-bit). On the Drivers tab, verify that the MySQL ODBC Driver appears in the list.

Step 2: Install the AnalyticDB for MySQL connector

  1. Download the AnalyticDB.MySQL.mez connector.

  2. Move AnalyticDB.MySQL.mez to the Custom Connectors folder in your Power BI directory. The default path is [Documents]\Power BI Desktop\Custom Connectors. If the folder doesn't exist, create it.

    Important

    - [Documents] is the Documents folder for the current Windows user account. For the Administrator account, the default path is C:\Users\Administrator\Documents\Power BI Desktop. - Power BI loads connectors only from the current user's folder. Install and maintain connectors separately for each account.

  3. Open Power BI and go to Options and settings > Options.

    image

  4. Click Security. Under Data Extensions, select (Not Recommended) Allow any extension to load without validation or warning, then click OK.

    image

  5. In the Change Requires Restart dialog box, click OK, then restart Power BI.

Step 3: Connect to AnalyticDB for MySQL

  1. Open Power BI and click Get data from another source.

    image

  2. In the Get Data dialog box, select AnalyticDB MySQL(Beta)(Custom) and click Connect.

    The connector is labeled Beta, which means it may have functional limitations or change in future releases.

    image

  3. In the Connecting to a third-party service dialog box, click Continue.

    image

  4. In the AnalyticDB MySQL database dialog box, configure the connection parameters.

    ParameterRequiredDescription
    ServerYesThe endpoint and port of the cluster, in the format <Endpoint>:Port. Use the VPC address if Power BI is on an Elastic Compute Service (ECS) instance in the same virtual private cloud (VPC) as the cluster; use the public endpoint otherwise. The port is fixed at 3306.
    DatabaseNoThe name of the database in the cluster.
    Connection timeout in secondsNoThe timeout period for connecting to the AnalyticDB for MySQL cluster. Unit: seconds (s).
    Read timeout in secondsNoThe maximum time (in seconds) allowed for a read operation. Unit: seconds (s).
    Write timeout in secondsNoThe maximum time (in seconds) allowed for a write operation. Unit: seconds (s).
    Don't cache results of forward-only cursorsNoWhen selected, Power BI skips caching query results when using forward-only cursors.
    Force use of forward-only cursorsNoWhen selected, Power BI always uses forward-only cursors for queries.
    Native queryNoA SQL query statement. If left blank, all tables appear in the Navigator dialog box.
    Data Connectivity modeYesThe data connection mode. Select Import to load data into Power BI, or DirectQuery to query the cluster directly without importing data.

    image

  5. In the AnalyticDB MySQL dialog box, enter your credentials and click Connect.

    ParameterDescription
    User nameThe database account for the AnalyticDB for MySQL cluster.
    PasswordThe password for the database account.

    image

  6. In the Navigator dialog box, select the target table, preview the data on the right, then click Load.

  7. After loading, start analyzing your data. For more information, see the official Power BI documentation.

    image

Connect using the built-in MySQL connector

The built-in MySQL connector supports Import mode only. For DirectQuery, use the custom connector instead.

  1. Download and install the MySQL Connector.

    Power BI automatically detects whether the MySQL Connector is installed. If it's missing, Power BI prompts you to install it.
  2. Open Power BI and click Get data from another source.

    image

  3. Select MySQL database and click Connect.

    image

  4. In the MySQL database dialog box, configure the parameters and click OK.

    ParameterRequiredDescription
    ServerYesThe endpoint and port of the cluster, in the format <Endpoint>:Port. Use the VPC address if Power BI is on an ECS instance in the same VPC as the cluster; use the public endpoint otherwise.
    DatabaseNoThe name of the database in the cluster.

    image

  5. In the MySQL Database dialog box, click the Database tab, enter your credentials, and click Connect.

    ParameterRequiredDescription
    User nameYesThe database account for the AnalyticDB for MySQL cluster.
    PasswordYesThe password for the database account.

    image

  6. In the Encryption Support dialog box, click OK.

    image

  7. In the Navigator dialog box, select the target table, preview the data on the right, then click Load.

  8. After loading, start analyzing your data. For more information, see the official Power BI documentation.

    image

Connect to a Spark JDBC endpoint

Use this method to connect to an interactive Spark resource group via ODBC.

Step 1: Download a driver

Choose either driver based on your environment:

Step 2: Create a data source

  1. Open ODBC Data Source Administrator (64-bit). On the User DSN tab, click Add.

  2. In the Create New Data Source dialog box, select the driver you downloaded and click Finish.

  3. In the Microsoft Spark ODBC Driver DSN Setup or Simba Spark ODBC Driver DSN Setup dialog box, configure the parameters.

    ParameterDescription
    Data Source NameA name for this data source. Choose any name.
    DescriptionAn optional description for the data source.
    Host(s)The endpoint of the interactive Spark resource group. For details, see Preparations.
    PortThe port of the interactive Spark resource group. Fixed at 10000.
    DatabaseThe name of the AnalyticDB for MySQL database.
    MechanismThe authentication method. Select User Name and Password.
    User NameThe database account and resource group name, in the format Resource group name/Database account name. For example, if the resource group is testjob and the account is test, enter testjob/test.
    PasswordThe password for the database account.
    Thrift TransportThe connection method. Fixed at SASL.

    image

  4. Click SSL Options. In the SSL Options dialog box, clear Enable SSL and click OK.

    image

  5. Click Advanced Options. In the Advanced Options dialog box, select Get Tables with Query.

    image

  6. Click Server Side Properties. Clear Apply properties with queries and click OK.

    image

  7. Click Test to verify the connection. A SUCCESS message confirms the ODBC connection to the interactive Spark resource group is working.

    image

Step 3: Connect Power BI to the data source

  1. Open Power BI and click Get data from another source.

    image

  2. In the Get Data dialog box, select ODBC and click Connect.

    image

  3. In the From ODBC dialog box, select the data source you created in Step 2 and click OK. In this example, the data source is adb_test.

    image

  4. In the ODBC driver dialog box, click the Windows tab, select Use my current credentials, and click Connect.

    image

  5. In the Navigator dialog box, select the target table, preview the data on the right, then click Load.

  6. After loading, start analyzing your data. For more information, see the official Power BI documentation.

    image

Limitations

ScopeLimitation
Custom connectorListed as Beta in the Power BI connector selection dialog. Beta status means the connector may have functional limitations or change in future releases.
Built-in MySQL connectorSupports Import mode only. For DirectQuery, use the custom connector.
Spark JDBC endpointOnly tables using the XUANWU table engine are supported. Tables using the XUANWU_V2 table engine are not supported.