MySQL修改用户密码时提示:Unknown column ‘password’ in 'field list’解决
-
今天在使用
update user password='password' where user='root';
修改密码时提示我password字段不存在,再检查完成拼写错误后我使用
select password from user;
报出相同错误,所以我最后确认原因是password在我的user表中不存在,在查阅mysql文档后发现在8.0版本中已经没有了password字段,取而代之的是authentication_string字段,所以修改命令为:
update user authentication_string='password' where user='root';
后问题成功解决!