随笔 - 0, 文章 - 264, 评论 - 170, 引用 - 0
数据加载中……

ERROR 1045 (28000): Access denied for user 'openfire'@'localhost' (using password: YES)

mysql -u root -p

Then I created a new user bill with host %

CREATE USER 'bill'@'%' IDENTIFIED BY 'passpass';

Granted all the privileges to user bill:

grant all privileges on . to 'bill'@'%' with grant option;

Then I exit from root user and try to login with bill:

mysql -u bill -p

entered the correct password and got this error:

ERROR 1045 (28000): Access denied for user 'bill'@'localhost' (using password: YES)


错误原因:
mysql.user表中存在一条user=''的记录,导致登录时首先匹配到这条记录,所以无法登录。

解决办法:
删除掉这条用户记录,即操作语句:DELETE FROM mysql.user where user='';

posted on 2014-11-08 14:15 小一败涂地 阅读(860) 评论(0)  编辑  收藏 所属分类: 数据库(oracle、mysql、sql server等)相关


只有注册用户登录后才能发表评论。


网站导航: