[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

5.Zabbix添加 MySQL by Zabbix Agent2模板,定义变量

END

posted @ 2020-08-26 12:31  LeoShi2020  阅读(908)  评论(0编辑  收藏  举报