This topic describes how to use Yonghong BI to connect to an AnalyticDB for MySQL cluster for real-time data analysis.

Prerequisites

  • MySQL JDBC is installed.
  • Yonghong BI is installed.
  • A public endpoint is obtained for the AnalyticDB for MySQL cluster if you want to connect to an AnalyticDB for MySQL cluster over the Internet. For more information, see Apply for or release a public endpoint.

Use Yonghong BI to connect to AnalyticDB for MySQL

  1. Start Yonghong BI.
  2. In the left-side navigation pane, click Create Connection.
  3. On the page that appears, select AnalyticDB.
  4. On the Database dialog box, configure the parameters that are described in the following table.
    ParameterDescription
    Select ConnectionSelect ADS.
    DriverThe type of the driver. Select com.mysql.jdbc.Driver from the drop-down list.
    URLThe connection string of the AnalyticDB for MySQL cluster to which you want to connect. Format: jdbc:mysql://hostname:port/dbname.
    • hostname: the public or VPC endpoint of the AnalyticDB for MySQL cluster. You can view the endpoint on the Cluster Information page of the AnalyticDB for MySQL console.
    • port: the port number of the AnalyticDB for MySQL cluster. Default value: 3306.
    • dbname: the name of the AnalyticDB for MySQL database.
    UsernameThe name of the account used to connect to the AnalyticDB for MySQL cluster. You can use one of the following account types:
    • Privileged account
    • Standard account
    PasswordThe password of the account used to connect to the data source.
    DatabaseThe name of the database in the AnalyticDB for MySQL cluster.
  5. After you configure the preceding parameters, click Test Connection to test connectivity. After the connection passes the test, you can connect to the AnalyticDB for MySQL database.

Use Yonghong BI

After Yonghong BI is used to connect to the AnalyticDB for MySQL cluster, you can obtain data from the AnalyticDB for MySQL cluster and use Yonghong BI to generate reports. For more information about how to use Yonghong BI, see Yonghong BI documentation.