首页 > 代码库 > zabbix monitor mysql
zabbix monitor mysql
1、grant user for mysql
GRANT USAGE ON *.* TO ‘zabbix‘@‘localhost‘ IDENTIFIED BY "zabbix";
2、touch /var/lib/zabbix/.my.cnf
# Zabbix Agent
[mysql]
host=localhost
user=zabbix
password=zabbix
socket=/tmp/mysql.sock
[mysqladmin]
host=localhost
user=zabbix
password=zabbix
socket=/tmp/mysql.sock
3、cp userparameter_mysql.conf /etc/zabbix/zabbix_agentd.d/
HOME=/var/lib/zabbix #where store mysql grant user info ,after it mysql is mysql command full path
4、vim /etc/zabbix/zabbix_agentd.com
Include=/etc/zabbix/zabbix_agentd.d/
5、/etc/init.d/zabbix_agentd restart
6、zabbix_get -s 127.0.0.1 -k mysql.status[Com_begin]
7、Apply Template App MySQL
本文出自 “ThunderMeng” 博客,请务必保留此出处http://thundermeng.blog.51cto.com/9414441/1608322
zabbix monitor mysql