免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 56224 | 回复: 5
打印 上一主题 下一主题

[Zabbix] zabbix连接不上数据库 [复制链接]

论坛徽章:
2
IT运维版块每日发帖之星
日期:2016-08-03 06:20:00IT运维版块每日发帖之星
日期:2016-08-08 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2016-07-31 17:12 |只看该作者 |倒序浏览
zabbix页面一直报错:zabbix server is not running: the information displayed may not be current

本地数据库也是可以登陆的
[root@localhost ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1767
Server version: 5.6.32 MySQL Community Server (GPL)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
然后我数据库也做了授权:
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'admin';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

日志:
tail -f /tmp/zabbix_server.log
3260:20160731:020435.283 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'root'@'localhost' (using password: NO)
  3260:20160731:020435.283 Database is down. Reconnecting in 10 seconds.
配置文件里的数据库设置也没错:
/etc/zabbix/zabbix_server.conf
DBName=zabbix
DBUser=root
DBPassword=admin

是因为什么原因呢,各位大神,帮帮我

论坛徽章:
2
IT运维版块每日发帖之星
日期:2016-08-03 06:20:00IT运维版块每日发帖之星
日期:2016-08-08 06:20:00
2 [报告]
发表于 2016-07-31 17:24 |只看该作者
网上还多方法都试了还是不行,大神在哪

论坛徽章:
0
3 [报告]
发表于 2016-08-03 11:06 |只看该作者
zabbix服务启动了没?我是centos,启动的fedora的脚本

我之前的问题是zabbix_server.conf 没有写连接数据库的密码

你还看看日志里怎么写的

论坛徽章:
9
操作系统版块每日发帖之星
日期:2016-01-08 06:20:00操作系统版块每日发帖之星
日期:2016-01-28 06:20:0015-16赛季CBA联赛之四川
日期:2016-05-17 17:50:32操作系统版块每日发帖之星
日期:2016-08-01 06:20:0015-16赛季CBA联赛之广东
日期:2016-08-01 16:01:57操作系统版块每日发帖之星
日期:2016-08-04 06:20:00IT运维版块每日发帖之星
日期:2016-08-07 06:20:00操作系统版块每日发帖之星
日期:2016-08-07 06:20:0015-16赛季CBA联赛之福建
日期:2017-03-07 17:14:27
4 [报告]
发表于 2016-08-04 17:38 |只看该作者
DBUser=zabbix

论坛徽章:
2
IT运维版块每日发帖之星
日期:2016-08-03 06:20:00IT运维版块每日发帖之星
日期:2016-08-08 06:20:00
5 [报告]
发表于 2016-08-05 10:33 |只看该作者
问题已经解决,用启动脚本启动,不能用命令启

论坛徽章:
2
IT运维版块每日发帖之星
日期:2016-08-03 06:20:00IT运维版块每日发帖之星
日期:2016-08-08 06:20:00
6 [报告]
发表于 2016-08-05 10:33 |只看该作者
问题已经解决,用启动脚本启动,不能用命令启
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP