Solution for Windows Server to forget the MySQL administrator root password

Source: Internet
Author: User
, Stop MySQL service, CMD open DOS window, enter net stop MySQL

2. In the CMD command line window, enter the MySQL installation directory, for example, D: \ mysql20080505 \ bin.

3. Enter the MySQL security mode, that is, when MySQL is up, it can enter the database without entering the password.
Command: mysqld-NT -- skip-grant-tables


***************************************
4. Open a new cmd command line window and enterMysql-uroot-P, Use the empty password to log on to MySQL (do not enter the password, press Enter)

5. Enter the following command to modify the password of the root user (Note: mysql. user has a "point" in the command")
Mysql>Update mysql. User SET Password = PASSWORD ('new password') where user = 'root ';

6. Refresh the permission table
Mysql>Flush privileges;

7. Exit
Mysql>Quit

So MySQL super Administrator account root has been reset, then in the task manager to end the mysql-nt.exe this process, restart MySQL! (You can also restart the server)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.