美文网首页
update user set Password = passw

update user set Password = passw

作者: 似朝朝我心 | 来源:发表于2021-06-05 14:46 被阅读0次

新安装的MySQL5.7,登录时提示密码错误,安装的时候并没有更改密码,后来通过免密码登录的方式更改密码。

旧版本的更改密码输入格式:
update mysql.user set password=password('12345678') where user='root'时提示:ERROR 1054 (42S22): Unknown column 'password' in 'field list'

原来是新版本的mysql数据库下已经没有password这个字段了,password字段正式改成了authentication_string字段

所以新版本mysql57需要更改语句替换为:

update MySQL.user set authentication_string=password('root') where user='root' ;

相关文章

网友评论

      本文标题:update user set Password = passw

      本文链接:https://www.haomeiwen.com/subject/swuqeltx.html