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 :D
Root Cause: root has no password, and your python connect statement should reflect that.
To solve error 1698, change your python connect password to ''.
note: manually updating the user's password will not solve the problem, you will still get error 1698
One pitfall I fell into is there is no password field now, it has been renamed so:
update user set password=PASSWORD("YOURPASSWORDHERE") where user='root';
Should now be:
update user set authentication_string=password('YOURPASSWORDHERE') where user='root';
Use the
ALTER USER
command rather than trying to update aUSER
row. Keep in mind that there may be more than one 'root' user, because user entities are qualified also by the machine from which they connecthttps://dev.mysql.com/doc/refman/5.7/en/alter-user.html
For example.