mysql改密码后登录不了
mysql-5.6.14 ndb-7.3.3
用以下命令更改root密码:
mysql> UPDATE mysql.user SET Password = PASSWORD('newpwd')
-> WHERE User = 'root';
mysql> FLUSH PRIVILEGES;
更改后用命令:select host,user,password from mysql.user;
查看,是16字符加密的密码。
(好像应该是41字符的加密密码才对,我猜的)
退出重登录报错如下:
ERROR 1275 (HY000): Server is running in --secure-auth mode, but 'root'@'localhost' has a password in the old format; please change the password to the new format
old_passwords 参数值为1
mysql> SELECT @@session.old_passwords, @@global.old_passwords;
+-------------------------+------------------------+
| @@session.old_passwords | @@global.old_passwords |
+-------------------------+------------------------+
| 1 | 1 |
+-------------------------+------------------------+
1 row in set (0.00 sec)
现在不能登陆,求高手支招,
1.如何重新登陆
2.如何更改密码