In windows, how does one forget the mysql super administrator root password? mysqlroot

Source: Internet
Author: User

In windows, how does one forget the mysql super administrator root password? mysqlroot
Today, I helped a friend retrieve the MYSQL super administrator's ROOT password. When I started to enter the command, I played less "point" for several hours and finally solved the problem. I wrote a tutorial, easy to use later!

If your server is windows xp/2000/2003/nt, you can use this method to retrieve the lost MYSQL super administrator root password.

1. stop MYSQL. Open the DOS window in CMD and enter net stop mysql.



2. in the CMD command line window, enter the MYSQL installation directory, for example, d: mysql20080505 in.



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, enter mysql-uroot-p, and log on to MySQL using a blank password (Press enter without entering the password)



5. Enter the following command to modify the password of the root user (Note: There is a "point" in the middle of mysql. user ")
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)

After MYSQL is restarted, you can log on to MYSQL with the newly set ROOT password! Today, I helped a friend retrieve the MYSQL super administrator's ROOT password. When I started to enter the command, I played less "point" for several hours and finally solved the problem. I wrote a tutorial, easy to use later!

If your server is windows xp/2000/2003/nt, you can use this method to retrieve the lost MYSQL super administrator root password.

1. stop MYSQL. Open the DOS window in CMD and enter net stop mysql.



2. in the CMD command line window, enter the MYSQL installation directory, for example, d: mysql20080505 in.



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, enter mysql-uroot-p, and log on to MySQL using a blank password (Press enter without entering the password)



5. Enter the following command to modify the password of the root user (Note: There is a "point" in the middle of mysql. user ")
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)

After MYSQL is restarted, you can log on to MYSQL with the newly set ROOT password!

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.