码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2016-11-29 22:56:20      阅读:1398      评论:0      收藏:0      [点我收藏+]

标签:name   没有   问题   password   ora   init   failed   nbsp   sed   

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

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

问题: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

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

标签:name   没有   问题   password   ora   init   failed   nbsp   sed   

原文地址:http://www.cnblogs.com/alexzp/p/6115189.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!