All Products
Search
Document Center

AnalyticDB:Grafana

Last Updated:Apr 29, 2025

This topic describes how to use Grafana to connect to AnalyticDB for MySQL for visualized data analysis.

Prerequisites

Procedure

  1. Access the web page of Grafana. In the left-side navigation pane, choose Connections > Add new connection. On the page that appears, select MySQL.

    image

  2. On the MySQL data source page, click Add new data source.

    image

  3. In the dialog box that appears, configure the parameters.

    image

    The following table describes the parameters.

    Parameter

    Description

    Name

    The name of the data source. You can enter a custom name.

    Host URL

    The endpoint of the AnalyticDB for MySQL cluster.

    • If Grafana is installed on an Elastic Compute Service (ECS) instance that resides in the same virtual private cloud (VPC) as the AnalyticDB for MySQL cluster, enter the VPC endpoint.

    • If Grafana is installed on an on-premises server, enter the public endpoint.

    Database name

    The name of the database in the AnalyticDB for MySQL cluster.

    Username

    The name of the database account of the AnalyticDB for MySQL cluster.

    Password

    The password of the database account of the AnalyticDB for MySQL cluster.

    Other parameters

    For information about other parameters, see Grafana documentation.

  4. Click Save & Test. If the Database Connection OK message is displayed, the connection is successful.

  5. Perform data analysis.

    After the connection is established, you can perform data analysis based on the data source. For more information, see Grafana documentation.

    image