1, press "Win+r" to open the "Run" window, enter "services.msc" command and press ENTER.
2. After entering the service window, select "MySQL56" in the right window and "stop" it so that the MySQL server service is stopped.
3, find MySQL in the Win7 computer installation location, you will see its folder has an INI format file, which is used to record MySQL configuration information files.
4, directly open the Command Prompt window, open the Command Line window, enter the following command: C:userswang>mysqld--defaults-file= "D:program filesmysqlmysql Server 5.6my-default.ini "--console--skip-grant-tables, after another open a command line window, input command: Mysql-u root-p, enter the MySQL command line interface.
5, so you can modify the system's database, the password to update. The commands you need to use here are:
Mysql->show database;
Mysql->use MySQL
Mysql->update user Set Password=password (' 12345 ') where user= ' root ';
The 12345 of this command represents the new password, and you can change the password yourself.