All Products
Search
Document Center

AnalyticDB:Superset

Last Updated:Mar 28, 2026

Apache Superset is a free, open source data exploration and visualization platform that supports MySQL, PostgreSQL, and other Java Database Connectivity (JDBC)-compatible database engines. This guide walks you through connecting Superset to an AnalyticDB for MySQL cluster and running your first query in SQL Lab.

Prerequisites

Before you begin, ensure that you have:

  • Superset 4.1.1 or later installed. See Quickstart for installation instructions.

  • The IP address of the Superset server added to the IP address whitelist of your AnalyticDB for MySQL cluster. See IP address whitelists.

Connect Superset to AnalyticDB for MySQL

Step 1: Gather connection details

Collect the following information before configuring the connection in Superset:

ParameterDescription
HOSTThe endpoint of your AnalyticDB for MySQL cluster. Use the internal endpoint if Superset runs on an Elastic Compute Service (ECS) instance in the same virtual private cloud (VPC) as the cluster. Use the public endpoint if Superset runs on an on-premises server.
PORT3306
DATABASE NAMEThe name of the database in the cluster
USERNAMEThe database account name
PASSWORDThe database account password
DISPLAY NAMEA display name for this connection in Superset

Step 2: Install the MySQL driver (Python installs only)

Skip this step if you installed Superset with Docker — the MySQL driver is already included in the Docker image.

If you installed Superset with Python, install the MySQL driver manually. For driver options and installation commands, see Connecting to Databases.

Step 3: Add the database connection

  1. Open the Superset web interface. In the upper-right corner, choose Settings > Database Connections.

  2. On the Databases page, click +DATABASE in the upper-right corner.

  3. In the Connect a database dialog box, select MySQL as the data source.

  4. Enter the connection details you gathered in Step 1, then click CONNECT.

Step 4: Enable SQL Lab permissions

  1. In the Actions column, click the image icon next to your new connection.

  2. Go to the ADVANCED tab and click SQL Lab.

  3. Select the database operations to allow. For this example, select Allow DDL and DML, then click FINISH.

image

Step 5: Run a query in SQL Lab

  1. In the top navigation bar, choose SQL > SQL Labs.

  2. In the left-side pane, configure the following parameters:

    ParameterDescription
    DATABASEThe connection you created in Step 3
    SCHEMAThe database where you want to run SQL
    SEE TABLE SCHEMAThe table you want to query
  3. In the code editor on the right, enter and run your SQL statement.

image

After the query runs, results appear below the editor. Your AnalyticDB for MySQL cluster is now connected and ready to use with Superset.