1grant user for mysql

GRANT USAGE ON *.* TO 'zabbix'@'localhost' IDENTIFIED BY "zabbix";

2touch /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

3cp 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

4vim /etc/zabbix/zabbix_agentd.com

Include=/etc/zabbix/zabbix_agentd.d/

5/etc/init.d/zabbix_agentd restart

6zabbix_get -s 127.0.0.1 -k mysql.status[Com_begin]

7Apply Template App MySQL