Reset MySQL root Password on Windows

MySQLToday i received a ticket from customer said that they forgot their MySQL root Password. They request us to reset their MySQL root password. Currently their MySQL Server running on Windows Server 2008.

To reset the MySQL Root Password on Windows the steps almost same as reset MySQL Root Password in Linux. To learn how to reset MySQL Password in Linux, just click HERE.

On Windows, use the following procedure to reset the password for all MySQL root accounts:

1) Log on to your system as Administrator.

2) Stop the MySQL server services. Just go to the Services manager ( Start Menu -> Control Panel -> Administrative Tools -> Services), find the MySQL service in the list and stop it.

3) Open your MS-DOS command prompt using “cmd” inside the Run window.

4) Navigate to your MySQL bin folder, such as C:\MySQL\bin using the cd command


cd C:\Program Files\MySQL\MySQL Server 5.5\bin

5) Enter “mysql” and press enter.

C:\Program Files\MySQL\MySQL Server 5.5\bin>mysql

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 578

Server version: 5.0.83-enterprise-nt MySQL Enterprise Server – Pro Edition (Commercial)

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.


6) All the user password store in database called mysql. You should  Type “use mysql;” command so that we switch to the “mysql” database.

mysql> use mysql;
Database changed

7) Now, just execute the following command to update the password:

mysql> UPDATE user SET Password = PASSWORD(‘NEW_PASSWORD’) WHERE User = ‘root’;

Execute the following command in the command prompt: mysqld.exe -u root –skip-grant-tables

4. After you are finished close the first command prompt and type “exit;”

mysql> exit

Now, you can start the MySQL service. After that, you should able to access your MySQL root with the new password.

Please do share with me if you facing any problem using above step. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *