当前位置: 首页 >数据库 > 【zabbix】connection to database 'zabbix' failed: [1045] Access denied for user 'root'@'localhost' (using password: NO)

【zabbix】connection to database 'zabbix' failed: [1045] Access denied for user 'root'@'localhost' (using password: NO)

前面安装的我就不说了,度娘上的很多;

关键是这个问题,网上的比较多,但是没有发现有用的;

问题:zabbix server is runing  No

【zabbix】connection to database 'zabbix' failed: [1045] Access denied for user 'root'@'localhost' (using password: NO) _ JavaClub全栈架构师技术笔记

 

日志:/tmp/zabbix_server.log

connection to database 'zabbix' failed: [1045] Access denied for user 'root'@'localhost' (using password: NO)

 

解决过程:

1)找到安装目录:

[root@VMS30725 init.d]# find / -name fedora
/home/zabbix-2.2.10/misc/init.d/fedora

2)copy文件:

[root@VMS30725 init.d]# cp /home/zabbix-2.2.10/misc/init.d/fedora/core/* /etc/init.d/

3)修改zabbix_server文件:

[root@VMS30725 init.d]# pwd
/etc/init.d
[root@VMS30725 init.d]# vim zabbix_server

修改BaseDir参数:值为你的安装目录(此目录包含zabbix_server.conf文件)

BASEDIR=/usr/local/zabbix

4)修改zabbix_server.conf:

[root@VMS30725 etc]# pwd
/usr/local/zabbix/etc
[root@VMS30725 etc]# vim zabbix_server.conf

DBHost=localhost

DBName=zabbix

DBUser=root          --你的mysql用户名

DBPassword=123456      --根据你的密码填写

DBPort=3306

ListenIP=192.168.136.67    --注意不要写为localhost

 

注:用户名和密码可以用命令验证下是否正确:mysql -u root -p(Enter,输入密码)

5)检查日志:vim /tmp/zabbix_server.log

 

6)在web页面检查其状态是否为yes

作者:zp_Alex
来源链接:https://www.cnblogs.com/alexzp/p/6115189.html

版权声明:
1、JavaClub(https://www.javaclub.cn)以学习交流为目的,由作者投稿、网友推荐和小编整理收藏优秀的IT技术及相关内容,包括但不限于文字、图片、音频、视频、软件、程序等,其均来自互联网,本站不享有版权,版权归原作者所有。

2、本站提供的内容仅用于个人学习、研究或欣赏,以及其他非商业性或非盈利性用途,但同时应遵守著作权法及其他相关法律的规定,不得侵犯相关权利人及本网站的合法权利。
3、本网站内容原作者如不愿意在本网站刊登内容,请及时通知本站(javaclubcn@163.com),我们将第一时间核实后及时予以删除。





本文链接:https://www.javaclub.cn/database/117911.html

分享给朋友:

“【zabbix】connection to database 'zabbix' failed: [1045] Access denied for user 'root'@'localhost' (using password: NO)” 的相关文章

全面解析Redis 2022年05月13日 10:22:02
MYSQL的存储过程 2022年05月16日 21:54:19
MySQL事务和锁 2022年05月16日 21:54:37
MySQL主从复制 2022年05月17日 21:34:56
mysql查询给某个字段赋值 2022年06月10日 21:43:53