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

前面安裝的我就不說了,度娘上的不少;mysql

關鍵是這個問題,網上的比較多,可是沒有發現有用的;web

問題:zabbix server is runing  Nosql

 

日誌:/tmp/zabbix_server.logvim

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

 

解決過程:server

1)找到安裝目錄:blog

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

2)copy文件:io

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

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

相關文章
相關標籤/搜索