MySQL forgot the root password

MySQL forgot the root password

1. Start the task manager and end the MySQL process

2. Enter the command line, enter the bin directory of MySQL (& lt; environment change & gt; path, you can find the bin directory) and start the MySQL service

mysqld -nt –skip-grant-tables  

(start without checking permissions);

(it may appear: 120705 17:41:14 [warning] option ‘new’: Boolean value’t ‘wasn’t recognized. Set to off. )

3. Reopen a command prompt window



Input: MySQL – uroot

4. Change the root password:



update mysql.user set password=PASSWORD(‘newpass’) where User=’root’;

5, flush privileges;

6, quit

Reconnecting MySQL

Reprint address: a3695da601010 mrs.html

Read More: