When I turned on my MAC at night, I found that the root account suddenly could not log in to MySQL normally, so I planned to reset the password. After reading several articles, I found that the reset was unsuccessful and I always got the error of Unknown column 'password'. I looked at the user table structure and found that there was indeed no such field. After checking, it was found that the field name was changed after MySQL was upgraded, and the password name was changed to authentication_string. After knowing the reason, you can successfully reset the root password by following the command below. $sudo mysql.server stop #Shut down the normal MySQL service first$sudo mysqld_safe --skip-grant-tables #Skip MySQL authentication$sudo mysql -uroot -p #When prompted for the password, just press ENTER to enter the MySQL command linemysql>use mysql; mysql>update user set authentication_string=password('newpassword') where user='root'; mysql>exit; $sudo mysql.server start #Restart the MySQL service and you can log in normally with the new password The MySQL versions for Mac are: mysql Ver 14.14 Distrib 5.7.10, for osx10.11 (x86_64) using EditLine wrapper The above is the solution to the "Unknown column 'password" prompt when resetting the root password of MySQL. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Virtual machine clone Linux centos6.5 system network card configuration graphic tutorial
>>: How to use VIM editor in Linux
Table of contents 1. Check whether the docker env...
1. What is semanticization? Explanation of Bing D...
Let me briefly describe some common basic graphic...
Preface In database operations, in order to effec...
question: When I was doing project statistics rec...
In web design, it is very important to use an org...
Table of contents Difference between char and var...
Table of contents Case scenario Solving the probl...
1. Download address: http://dev.mysql.com/downloa...
Key Modifiers When listening for keyboard events,...
Blockquote Definition and Usage The <blockquot...
Result: Implementation code: Need to be used with...
Table of contents 1. Original demand 2. Solution ...
Table of contents Preface advantage: shortcoming:...
Table of contents 1. Page Layout 2. Image upload ...