Grant的时候报错的解决:Access denied for user 'root'@'localhost' (using password: YES)

时间:2014-07-01 07:08:30   收藏:0   阅读:1385


mysql> grant all on *.* to ‘root‘@‘192.168.1.1‘ identified by ‘password‘;

ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)


确认方式(查看是否有grant all 没有就是权限不全):

mysql>SHOW GRANTS FOR‘root‘@‘localhost‘;
+---------------------------------------------------------------------+
|Grants forroot@localhost                                           |
+---------------------------------------------------------------------+
|GRANTALLPRIVILEGES ON*.*TO‘root‘@‘localhost‘WITHGRANTOPTION


解决方法:运行bin下的mysql_upgrade,再重启数据库。

(运行前,最好先备份原来的数据库)

/usr/bin/mysql_upgrade -uroot -p



Grant的时候报错的解决:Access denied for user 'root'@'localhost' (using password: YES),布布扣,bubuko.com

原文:http://blog.csdn.net/terry_water/article/details/36010705

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!