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:mysql execution process 1.1: ...
We can use the scp command of Linux (scp cannot b...
Table of contents 1. exists 1.1 Description 1.2 E...
I have a server with multiple docker containers d...
The following error occurs when entering Chinese ...
This article uses examples to illustrate the prin...
Make an animation of the eight planets in the sol...
Preface Bash has many important built-in commands...
Table of contents Vue2 Writing Vue3 plugin versio...
introduction Let's start with our content. I ...
Table of contents Preface: 1. Introduction to rol...
MySQL 8.0.22 installation and configuration metho...
Table of contents Download tf-gpu Build your own ...
Table of contents Preface $attrs example: $listen...
Next, we will learn how to monitor server perform...