我给mysql改了密码,用以下方法:
[ooo@localhost ~]$ sudo /etc/init.d/mysqld stop
[ooo@localhost ~]$ sudo mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
[ooo@localhost ~]$ nohup: ignoring input and redirecting stderr to stdout
mysql> UPDATE user SET Password=PASSWORD('******') where USER='root';
Query OK, 3 rows affected (0.02 sec)
Rows matched: 3 Changed: 3 Warnings: 0
mysql> FLUSH PRIVILEGES;
mysql> quit
改完以后,依然不能登陆,报错:
Access denied for user 'root'@'localhost'
请问是什么问题呢?