ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'mysql'(转)

解决ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'

原创 2014年05月11日 11:42:25
 

 

# /etc/init.d/mysql stop 

# mysqld_safe --user=mysql --skip-grant-tables --skip-networking & 
# mysql -u root mysql 

mysql> UPDATE user SET Password=PASSWORD(’newpassword’) where USER=’root’; 

delete from user where USER='';

mysql> FLUSH PRIVILEGES; 
mysql> quit;

用户权限解决方案2

http://blog.csdn.net/faihtua/article/details/76786138

posted @ 2017-12-26 19:23  ComeComeGo  阅读(140)  评论(0编辑  收藏  举报