How to forget the mysql Super Administrator root password in windows _ MySQL

Source: Internet
Author: User
Solution 1: stop mysql, open the DOS window in CMD, and enter net stop MYSQL in windows
2. in the CMD command line window, enter the MYSQL installation directory, for example, D:/MySQL Server 5.5/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 or mysqld -- 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 (remember to use the password function)
Mysql> update mysql. user set password = PASSWORD ("new password") where user = "root ";
6. refresh the permission table
Mysql> flush privileges; (this step is required, otherwise some will not work)
7. exit
Mysql> quit
In this way, the mysql root has been reset, and the mysql-nt.exe( mysqld.exe) process is ended in the windows Task Manager, and you can restart MYSQL! (You can also restart the server in the window service)

Congratulations! your ROOT password has logged on to MYSQL!

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.