MySQL更改密码时ERROR 1054 (42S22): Unknown column ‘password’ in ‘field list’
emptycity 提问于:2017-02-26
0 0

安装完mysql后进入更新密码:

UPDATE user SET password=PASSWORD('root') WHERE user='root';
  • 所有回答
bluesky 回答于:2017-06-04
0 0

在新版的MYSQL5.7,mysql数据库中已经没有password字段,password字段改成了 authentication_string

use mysql;
update user set authentication_string=password(‘root’) where user=’root’

查看MYSQL版本:

select version();
+------------+
| version()  |
+------------+
| 5.6.21-log |
+------------+
1 row in set (0.06 sec)
我来回答    MySQL更改密码时ERROR 1054 (42S22): Unknown column ‘password’ in ‘field list’