//(press Ctrl+C now to disown the process and start typing commands again)
sudo mysql --user=root mysql
update user set Password=PASSWORD('new-password'); flush privileges; exit;
sudo killall mysqld_safe& //(press Ctrl+C now to disown the process and start typing commands again) /etc/init.d/mysql start
julyclyde
2013-09-07 21:46:31 +08:00
flush没用;关闭方法错误
blankion
2013-09-07 23:12:17 +08:00
@lfzyx 安装的时候,直接 yum install mysql mysql-server 完成的,没提示输入密码;
@echoxiangzhou 非常感谢,已经看到 Welcome to the MySQL monitor. 的提示了
在执行:
update user set Password=PASSWORD('new-password'); flush privileges; exit;
报出错误:
ERROR:1064(42000):You have an error in your SQL syntax;check the manual that corresponds to your MySQL server verison for the right syntax to use naer '=PASSWORD('123456')' at line 1