Cleverly solve the problem of Win7 forgetting Mysql password

  
                

There may be many people who don't know what Mysql means. Mysql is the database management system in Win7 system. But as a person engaged in IT, it should be very clear what Mysql means. When it comes to the database, everyone knows that this is generally safe. If you want to be safe, you will definitely have a password. Without a password, you can’t just The database is modified. Nowadays, there are too many things to remember passwords. It is inevitable that some passwords will be forgotten. What if I forget the Mysql password?

1. First, press the win+R shortcut on the win7 Ultimate computer keyboard to open the computer's running window. Then, directly enter services.msc in the running window and click Enter.

2. After entering the win7 Ultimate computer service window, find the right window of & ldquo; MySQL56 & rdquo ;, is selected, it & ldquo; Stop & rdquo; can be, so, MySQL The Server service is stopped.

3. Next, you need to find the installation location of MySQL in win7 Ultimate computer. After you find it, you will see a file in its folder with an ini format. This file is used to record MySQL. A file for configuration information.

4. Open direct Win7 Ultimate PC command prompt window, then open a command line window, enter the following command:

C: \\ Users \\ wang "mysqld --defaults-file=“D:\\Program Files\\MySQL\\MySQL Server 5.6\\my-default.ini” --console --skip-grant-tables, after that, open another command line window and enter the command: mysql -u root -p, press Enter to enter the mysql command line interface.

5. In the final step, you can modify the database of the Win7 Ultimate system and update the password.

The commands you need to use are:

mysql-"show database;

mysql-"use mysql

mysql-"update user set password= PASSWORD(‘12345’) where USER=‘root’;

The 12345 in the last line of commands represents our newly set password, you can modify it to your liking or you remember Password.

The above is the solution to forget the Mysql password in Win7 system, the password is best set to remember the password will not be forgotten, even if you forget the password, it does not matter, you can solve the problem according to our small series to teach you.

Copyright © Windows knowledge All Rights Reserved