[Solved] Mysql 5.7 Change Passwords ERROR 1054 (42S22): Unknown column ‘password’ in ‘field list’

1. Environment

Reinstalled the environment on the new server, which was 5.6, and upgraded to version 5.7. 

2. Problems

A new installation of MySQL 5.7 prompted a password error when logging in. I didn't change the password when I installed it, but later changed it by logging in password-free.

Enter.

update mysql.user set password=password('root') where user='root'

Error message: ERROR 1054 (42S22): Unknown column 'password' in 'field list'

3. Solutions

There is no password field in MySQL 5.7 + database. The password field is changed to authentication_ string.

#Just change the change statement to the following

update mysql.user set authentication_ string=password(‘root’) where user=’root’ ;

#Refresh permissions

flush privileges;

Similar Posts: