Home MySQL修改密码提示ERROR 1054
Post
Cancel

MySQL修改密码提示ERROR 1054

报错信息

执行update mysql.user set password=password('password') where user='root';会出现以下错误ERROR 1054 (42S22): Unknown column 'password' in 'field list'

报错原因

MySQL数据库下已经没有password这个字段了,password字段改成了authentication_string

解决办法

1
2
3
mysql> update mysql.user set authentication_string=PASSWORD('password') where user='root';
Query OK, 1 row affected, 1 warning (0.15 sec)
Rows matched: 1 Changed: 1 Warnings: 1
This post is licensed under CC BY 4.0 by the author.