I am trying to change MySql root password.
What I have done is below.
- Install MySql-5.7.6 ~ .dmg(Community Server) and workbench.
- Turn off the server on OSX System preferences.
- Access MySql with console. The command was
mysqld_safe --skip-grant
- Execute
update user set password=password('1111') where user='root';
and got an error message –>ERROR 1054 (42S22): Unknown column 'password' in 'field list'
.
FYI, I did use mysql;
.
So I did select query on user table and found password column actually does not exist.
It is very weird. Is it possible that original user table does not have password column?
How can I change password, which does not exist?
Thanks for your answer š
Best Solution
In MySQL 5.7, the password field in mysql.user table field was removed, now the field name is 'authentication_string'.
First choose the database:
And then show the tables:
You will find the user table, now let's see its fields:
Surpriseļ¼There is no field named 'password', the password field is named ' authentication_string'. So, just do this:
Now, everything will be ok.
Compared to MySQL 5.6, the changes are quite extensive: Whatās New in MySQL 5.7