Connect Grafana to AnalyticDB for MySQL
This topic describes how to connect Grafana to AnalyticDB for MySQL to visualize and analyze data.
Prerequisites
Procedure
-
Go to your Grafana home page. In the left navigation pane, click , and then select MySQL.
-
On the MySQL data source page, click Add new data source.
-
Configure the following parameters:
Parameter
Description
Name
A custom name for the data source.
Host URL
The endpoint of your AnalyticDB for MySQL cluster.
-
If Grafana is installed on an ECS instance in the same VPC as your AnalyticDB for MySQL cluster, enter the ECS endpoint.
-
If Grafana is installed on an on-premises server, enter the public endpoint.
Database name
The AnalyticDB for MySQL to use for the connection.
Username
The username for the AnalyticDB for MySQL.
Password
The password for the AnalyticDB for MySQL.
Other parameters
For more information, see the official Grafana documentation.
-
-
Click Save & Test. The Database Connection OK message indicates a successful connection.
-
Analyze your data.
Once configured, you can use the data source to visualize and analyze data. For more information, see the official Grafana documentation.
For example, create a new dashboard panel in Grafana. Select mysql-1 as the data source. Set Format to Table. Select adb_demo for Dataset and test for Table. For Column, select name and age. The query results are displayed in a table.