Reseting MySQL Root Password on Windows
April 13, 2011 Tinggalkan sebuah Komentar
For you who lost your mysql root password, you can follow this step to reset your password.
1. Log on to your system administrator account on your PC. To make sure you have grant access.
2. stop your mysql service. Go to start > run > type services.msc find service use name mysql or mysql-nt or you have specified OR open your taskmanager and kill the mysql process.
3. create file using notepad and write this statement
UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root'; FLUSH PRIVILEGES;
save as reset.txt on drive C:
4. run your mysql service using command prompt
click start > run > cmd
point your directory to drive C
and execute this statement
C:\> <strong><code>C:\mysql\bin\mysqld-nt --init-file=C:\\reset.txt</code></strong>
you can also add –console to see the progress of the process
5. just press ctrl + c if have execute that statement because this process appear to be unfinished.
6. You should now be able to connect to the MySQL server as root using the new password. Stop the MySQL server, then restart it in normal mode again. If you run the server as a service, start it from the Windows Services window. If you start the server manually, use whatever command you normally use.
7. try to login using root with your new password as you typed in file.
hope this help.