【zabbix】connection to database 'zabbix' failed: [1045] Access denied for user 'root'@'localhost' (us...

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

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

问题:zabbix server is runing  No

 

日志:/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

转载于:https://www.cnblogs.com/alexzp/p/6115189.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值