1. Client first creates MySQL user for Zabbix connection database
[[email protected] zabbix]# mysql-uroot-p123456-e "GRANT USAGE on * * to ' Zabbix ' @alhost ' identified by ' 12345 6 ' ";
2. Establishing a database connection information file
[email protected] zabbix]# vi/usr/local/zabbix/etc/.my.cnf
650) this.width=650; "src=" Http://note.youdao.com/yws/res/105/01BD6C64AF2640CC90B0D56C3557AAEE "style=" margin-top : 8px;height:auto; "alt=" 01bd6c64af2640cc90b0d56c3557aaee "/>
3. Copy the MySQL template userparameter_mysql.conf required key, to the/usr/local/zabbix/etc/zabbix_agentd.conf.d/directory
[email protected] zabbix]# cp/usr/local/src/zabbix-2.2.6/conf/zabbix_agentd/userparameter_mysql.conf/ usr/local/zabbix/etc/zabbix_agentd.conf.d/
4. Modify the userparameter_mysql.conf file to change the Home=/var/lib/zabbix to home=/usr/local/zabbix/etc that we have created. MY.CNF location
[email protected] ~]# vi/usr/local/zabbix/etc/zabbix_agentd.conf.d/userparameter_mysql.conf
650) this.width=650; "src=" http://note.youdao.com/yws/res/110/2ECB8BABC1BC43479B72FDF1DB6B8473 "style=" margin-top : 8px;height:auto; "alt=" 2ecb8babc1bc43479b72fdf1db6b8473 "/>
5. Modify the zabbix_agentd.conf file
[email protected] zabbix]# VI etc/zabbix_agentd.conf
This article is from the "Mr.liang" blog, make sure to keep this source http://liangml.blog.51cto.com/10852271/1855785
Zabbix monitoring MySQL