1. 程式人生 > >ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'mysql'(轉)

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

gpo style new quit ini pass clear set mys

解決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;

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