MySQL
Pre-requisitesβ
Check the supported versionsβ
DBmarlin supports most versions of MySQL from 5.6 and above. Please check the list of supported platforms before continuing and contact us if you are not sure.
Create a monitoring user with the correct permissionsβ
Before adding a target MySQL instance in the UI you should first create a dbmarlin user in the target database instance (you can choose to use a name other than dbmarlin if you prefer).
CREATE USER dbmarlin IDENTIFIED BY 'securepassword';
GRANT SELECT,PROCESS,SHOW DATABASES on *.* to 'dbmarlin'@'dbmarlinserver';
GRANT REPLICATION CLIENT ON *.* to 'dbmarlin'@'dbmarlinserver';
FLUSH privileges;
Enable performance_schemaβ
The performance_schema
in MySQL provides detailed performance information which DBmarlin can use. It performance_schema is not found you will only have a subset of the performance data available in DBmarlin.
Tables such as threads
, events_statements_summary_by_digest
, events_statements_history_long
, data_locks
and data_lock_waits
are used by DBmarlin to get SQL Statistics and Blocking Session information.
How to enable performance_schemaβ
-
Edit the Configuration File
Open your MySQL config file (usually
/etc/my.cnf
or/etc/mysql/my.cnf
, or a file under/etc/mysql/conf.d/
). Add or modify the following under the [mysqld] section:[mysqld]
performance_schema=ON -
Restart the Database
sudo systemctl restart mysql
-
Verify Itβs Enabled
SHOW VARIABLES LIKE 'performance_schema';
Replace dbmarlinserver
above with the IP or hostname of the server where you installed DBmarlin.
Adding the Database Targetβ
This is done through the User Interface using the Add Database screen