[Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (...

在配置了zabbix服务端后,发现:“zabbix server is running”的Value值是“no”

 

[Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (..._第1张图片

 

用:netstat -atnlp|grep 10051

发现没有出现zabbix_server的10051端口。在网上找了很多办法,发现都不管用。

 

通过查看日志看到如下错误提示:

tail /tmp/zabbix_server.log

[Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (..._第2张图片

 

解决方法:

用root帐号登录mysql

然后执行:

mysql> grant all on zabbix.* to 'zabbix'@'localhost' identified by 'zabbix' with grant option;

mysql>flush privileges;

再查看zabbix管理页面,发现已恢复正常。“zabbix server is running”的Value值是“yes”。

查看/tmp/zabbix_server.log的内容也恢复正常。

 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (..._第3张图片

 

执行:netstat -atnlp | grep 10051

发现端口号终于出现了!

 

 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (..._第4张图片

 

转载于:https://www.cnblogs.com/hy007x/p/6763889.html

你可能感兴趣的:([Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (...)