All Products
Search
Document Center

AnalyticDB for MySQL:Smartbi

Last Updated:Dec 12, 2023

You can use Smartbi to integrate data and make informed business decisions based on the reports that are provided by Smartbi. This topic describes how to use Smartbi to connect to an AnalyticDB for MySQL cluster.

Prerequisites

  • Smartbi V8.5 or later is installed.

  • An AnalyticDB for MySQL cluster is created. For more information, see Create a cluster.

  • The IP address of the server where Smartbi is located is included in an IP address whitelist of the AnalyticDB for MySQL cluster. For more information, see Configure a whitelist.

  • Optional. If Smartbi and the AnalyticDB for MySQL cluster reside in different zones, you must connect to the AnalyticDB for MySQL cluster over the Internet. For more information, see Apply for or release a public endpoint.

Procedure

  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, set the following parameters to connect to the AnalyticDB for MySQL cluster.

    4

    Parameter

    Description

    Name

    The name of the new data source. The name must be unique.

    Alias

    The display name of the new data source. This parameter is optional.

    Driver type

    The type of the driver. Select aliyun AnalyticDB.

    Driver storage directory

    The directory that is used to store the driver. Select Built-in product.

    Driver Class

    The class of the driver. Default value: com.mysql.jdbc.Driver. You do not need to set this parameter.

    Connection string

    The endpoint of the AnalyticDB for MySQL cluster. The value of this parameter must be in the following format:

    jdbc:mysql://<hostname>:<port>/<database>?useUnicode=true&characterEncoding=UTF-8&engine=MPP
    Note
    • hostname: the public or virtual private cloud (VPC) endpoint of the AnalyticDB for MySQL cluster. The default port number of the AnalyticDB for MySQL cluster is 3306.

    • database: the name of the database that belongs to the AnalyticDB for MySQL cluster.

    You can view the endpoint and port number in the Network Information section of the Cluster Information page. For more information, see Apply for or release a public endpoint.

    Username

    The account that is used to connect to the AnalyticDB for MySQL cluster.

    Password

    The password of the account that is used to connect to the AnalyticDB for MySQL cluster.

  5. Click Test connection(T). In the message that appears, click OK(O).

    8

  6. Click Save(S) in the lower-right corner of the Create Relational datasources page.

    After you connect to the AnalyticDB for MySQL cluster, you can find the database in the AnalyticDB for MySQL cluster from the console. In the left-side navigation pane, choose Data connection > adb > Database Management(S) to add resources to the database. For more information, see Database management.

    4

Use of Smartbi

After you complete the preceding steps, you can connect to the AnalyticDB for MySQL cluster and obtain data from the cluster in Smartbi. You can also analyze or visualize data in Smartbi. For more information about how to use Smartbi, see Smartbi documentation.