新安装的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' ;

网友评论