This section contains the required steps to ensure proper operation of Template DB MySQL by Zabbix agent, developed for monitoring DBMS MySQL and its forks (such as MariaDB, etc.) by Zabbix agent. For monitoring MySQL by ODBC see requirements for the MySQL by ODBC template.
The template doesn't support monitoring of the multi-master replications.
1. Install Zabbix agent and MySQL client.
If necessary, add the path to the
mysqladmin utilities to the global environment variable PATH.
2. Copy the
template_db_mysql.conf file (can be downloaded from the Zabbix Git repository) into folder with Zabbix agent configuration (/etc/zabbix/zabbix_agentd.d/ by default). Don't forget restart Zabbix agent.
3. Create MySQL user for monitoring (choose your own <password>). For example:
For more information, please see MYSQL documentation.
.my.cnf in the home directory of Zabbix agent for Linux (/var/lib/zabbix by default ) or
my.cnf in c:\ for Windows. The file must have three strings:
template_db_mysql.xml in Zabbix versions prior to 4.4.6) into Zabbix and link it to the target host.