mysql授权用户,启动报错。

回复 收藏
我通过mysql 外部命令授权一个用户
[root@Kry103 ~]# mysql -uroot -p -e "grant all on zabbix.* to 'zabbix'@'localhost' identified by 'zabbix';"
可以正常登录的

[root@Kry103 ~]# mysql -uzabbix -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 169
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, 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>



在zabbix_server.conf中已经启用了DBPassword=zabbix
DBSocket=/var/lib/mysql/mysql.sock检查存在。。


但是在启动zabbix的时候提示数据库拒绝链接:报错如下
51781:20160831:170010.694 Database is down. Reconnecting in 10 seconds.
51781:20160831:170020.695 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: NO)
51781:20160831:170020.695 Database is down. Reconnecting in 10 seconds.
51781:20160831:170030.696 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: NO)



这个怎么解决啊。。。iptables 是关闭的。。。

2016-08-31 17:02 举报
已邀请:
0

阿铭 管理员

赞同来自:

DBUser 是否有定义

回复帖子,请先登录注册

退出全屏模式 全屏模式 回复
评分
可选评分理由: