Smartbi

更新时间:
复制 MD 格式

Connect Smartbi to an AnalyticDB for MySQL cluster to query and visualize your data directly from Smartbi reports.

Prerequisites

Before you begin, make sure you have:

Choose your connection type

The hostname in your JDBC connection string depends on how Smartbi reaches your cluster:

Connection type When to use Hostname to use
Virtual Private Cloud (VPC) endpoint Smartbi and the cluster are in the same zone VPC endpoint of the cluster
Public endpoint Smartbi and the cluster are in different zones Public endpoint of the cluster

To find the endpoint and port, go to the Network Information page and check the Cluster Information section.

Connect Smartbi to AnalyticDB for MySQL

  1. Start Smartbi.

  2. Click the 1 icon in the left-side navigation pane, or click Data connection in the right-side menu.

    1

  3. On the All tab of the Data connection page, click Aliyun AnalyticDB.

    3

  4. On the Create Relational datasources page, configure the connection parameters.

    4

    Parameter Description
    Name A unique name for this data source
    Alias (Optional) A display name for this data source
    Driver type Select aliyun AnalyticDB
    Driver storage directory Select Built-in product
    Driver Class Default value: com.mysql.jdbc.Driver. Leave this unchanged.
    Connection string The JDBC connection string for your cluster. See the format below.
    Username The account used to connect to the cluster
    Password The password for the account

    Connection string format:

    jdbc:mysql://<hostname>:<port>/<database>?useUnicode=true&characterEncoding=UTF-8&engine=MPP

    Replace the placeholders with your actual values:

    Field Description Example
    <hostname> The VPC or public endpoint of your cluster am-xxxx.ads.aliyuncs.com
    <port> The cluster's port number. Default is 3306. 3306
    <database> The name of the database in your cluster my_database
    useUnicode=true&characterEncoding=UTF-8 Character encoding settings. Leave unchanged.
    engine=MPP Specifies the Massively Parallel Processing (MPP) query engine. Leave unchanged.
  5. Click Test connection(T). In the message that appears, click OK(O).

    8

  6. Click Save(S) in the lower-right corner.

After saving, you can manage your cluster databases from within Smartbi. In the left-side navigation pane, choose Data connection > adb > Database Management(S) to add resources to the database. For details, see Database management.

4

What's next

With the connection established, use Smartbi to query, analyze, and visualize data from your AnalyticDB for MySQL cluster. For full Smartbi documentation, see Smartbi documentation.