[zabbix]监控MySQL5.7.31 Agent2
1.MySQL版本[root@DB3 ~]
# mysqld --version
mysqld Ver 5.7.31 for Linux on x86_64 (MySQL Community Server (GPL))
2.创建监控账号并授权
CREATE USER 'zbx_monitor'@'%' IDENTIFIED BY 'password';
GRANT USAGE,REPLICATION CLIENT,PROCESS,SHOW DATABASES,SHOW VIEW ON *.* TO 'zbx_monitor'@'%';
FLUSH PRIVILEGES;
3.修改my.cnf配置文件
[client]
user=zbx_monitor
password=password
4.查看自己的mysql.sock文件路径
/var/lib/mysql/mysql.sock