update mysql.user set password=password('root') where user='root';
报错 ERROR 1054 (42S22): Unknown column ‘password’ in ‘field list’
mysql 数据库下已经没有 password 字段,password 字段改成了 authentication_string
使用新字段
update mysql.user set authentication_string=password('abc123!@#') where user='root';
重启计算机
reboot
密码修改成功;

本文介绍了解决在MySQL中更新root用户密码时遇到的ERROR 1054(42S22)错误的方法。由于数据库字段由password更改为authentication_string,直接更新password将导致错误。文章提供了正确的SQL语句更新新字段,并指导如何重启服务以使更改生效。
3082

被折叠的 条评论
为什么被折叠?



