The previous blog about the root password in MySQL forgot how to get back, but the landlord encountered a more silent is to use the-skip-grant-tables option to start the MySQL service, ready to change the password when the user table is found to be empty, 650) this.width =650; "src=" Http://img.baidu.com/hi/face/i_f06.gif "alt=" I_f06.gif "/>"
Update user set Password=password (' NewPassword ') where user= ' root ';
Enter the change password to get
0 rows affected rows matched:0 changed:0
The egg is very painful, that also change a fluffy AH!!! 650) this.width=650; "src=" Http://img.baidu.com/hi/face/i_f06.gif "alt=" I_f06.gif "/>650" this.width=650; "src=" Http://img.baidu.com/hi/face/i_f06.gif "alt=" I_f06.gif "/>
A netizen said to create root and give permission
Grant all on * * to [e-mail protected] ' localhost ' identified by ' password '; grant all on * * to [email protected] '% ' identif IED by ' password ';
But then the egg ah, after using-skip-grant-tables login, create user prompt error Ah, prompted in-skip-grant-tables unable to create the user.
Landlord completely collapsed!!! 650) this.width=650; "src=" Http://img.baidu.com/hi/face/i_f06.gif "alt=" I_f06.gif "/>650" this.width=650; " Src= "Http://img.baidu.com/hi/face/i_f06.gif" alt= "I_f06.gif"/>650) this.width=650; src= http://img.baidu.com/ Hi/face/i_f06.gif "alt=" I_f06.gif "/>
ERROR 1290 (HY000): The MySQL server is running with the--skip-grant-tables option so it cannot execute this statement
And then I tried to flush the privileges a bit,
mysql> flush Privileges; Query OK, 0 rows affected (0.01 sec)
OK, then do add root user can, query user table found inside already have data, haha, fix, continue to change password, restart effective 650) this.width=650; "Src=" http://img.baidu.com/hi/ Face/i_f27.gif "alt=" I_f27.gif "/>
Linux---mysql password recovery mode Premium version