All Products
Search
Document Center

AnalyticDB:Metabase

Last Updated:Mar 28, 2026

Metabase is an open-source business intelligence (BI) platform that lets you explore and visualize data from various data sources, such as MySQL and PostgreSQL, through an intuitive web interface. This guide explains how to connect Metabase to AnalyticDB for MySQL using either a standard MySQL endpoint or a Spark Java Database Connectivity (JDBC) endpoint.

Prerequisites

Before you begin, make sure you have:

Connect Metabase to an ADB MySQL endpoint

  1. In your AnalyticDB for MySQL cluster, run the following command to allow other data types to be converted to the UNSIGNED INTEGER type.

    Warning

    If you skip this step, Metabase cannot correctly obtain the metadata.

    SET ADB_CONFIG O_UNSIGNED_AS_BIGINT_ENABLED=true;
  2. Open the Metabase web interface. In the upper-right corner, click the image icon and select Admin Settings from the drop-down menu.

    image

  3. In the top navigation bar, click Databases, then click Add Database.

    image

  4. Configure the following parameters and click Save. For other parameters, see the Metabase documentation.

    Warning

    In the Additional JDBC connection string options field, do not add spaces before or after =. A space in this value causes data visualization to fail after the connection is established.

    ParameterDescription
    Database typeSelect MySQL from the drop-down list.
    Display nameA display name for the data source. Any name works.
    HostThe endpoint of your AnalyticDB for MySQL cluster. Use the internal endpoint if Metabase runs on an Elastic Compute Service (ECS) instance in the same Virtual Private Cloud (VPC) as the cluster. Use the public endpoint if Metabase runs on a local server.
    PortFixed at 3306.
    Database nameThe name of the database in your AnalyticDB for MySQL cluster.
    UsernameThe database account for your AnalyticDB for MySQL cluster.
    PasswordThe password for the database account.
    Additional JDBC connection string optionsEnter tinyInt1isBit=false.
  5. After saving, you can connect to AnalyticDB for MySQL and start data analytics. For available operations, see the Metabase documentation.

    image

Connect Metabase to a Spark JDBC endpoint

  1. Open the Metabase web interface. In the upper-right corner, click the image icon and select Admin Settings from the drop-down menu.

    image

  2. In the top navigation bar, click Databases, then click Add Database.

    image

  3. Configure the following parameters and click Save.

    ParameterDescription
    Database typeSelect Spark SQL from the drop-down list.
    Display nameA display name for the data source. Any name works.
    HostThe endpoint of the Spark Interactive resource group. To get this endpoint, see Preparations.
    PortFixed at 10000.
    Database nameThe name of the database in your AnalyticDB for MySQL cluster.
    UsernameThe database account for your AnalyticDB for MySQL cluster.
    PasswordThe password for the database account.
    Additional JDBC connection string optionsEnter ?resource_group=<Resource Group Name>, replacing <Resource Group Name> with the name of your Spark Interactive resource group.

    image

  4. After saving, you can connect to AnalyticDB for MySQL and start data analytics. For available operations, see the Metabase documentation.

    image