Install MySQL Dashboard and Collector
Now we have a MySQL Data Source created, we will install a dashboard for it.
The dashboard will be the popular 2MySQL Simple Dashboard you can download from https://grafana.com/grafana/dashboards?dataSource=mysql
Before installing the dashboard, we need to set up a collector on our MySQL server. The collector script is downloaded from https://github.com/meob/my2Collector
I have MySQL 8.0.21, so I will download the file called
If you have MySQL 5, then download
I download the script using wget,
The event scheduler will also need to be enabled on your MySQL server.
You can do this by editing the
1 2 3
Save, and restart,
Open the script that was downloaded
Uncomment the last 2 lines. Set the password to something you want, and save
Run the sql script,
Open MySQL and so some checks.
1 2 3 4 5 6 7
If everything is ok, continue
Import the new dashboard using the Grafana GUI as shown in the video lecture,
I have an error after installing the Dashboard, that the SELECT command is denied for user
I need to grant SELECT to the user on the new database
my2 which was created when running the
1 2 3
Reopen the dashboard, and you should begin to see data.
Note that there are now 2 database users,
grafana@localhost: Used by the Grafana dashboard, to query the collected data from the MySQL server. This user has been granted the SELECT privilege only.
my2@localhost: Used by the MySQL event scheduler to collect statistics and save them into the DB for use by the Grafana dashboard. This user has been granted ALL privileges.