Tuesday, 21 August 2012

Reset MySQL password in windows7


Hello friends.If you have forgotten your MySQL root password and some useful database is there in MySQL then you must need root password to access those files. To reset your root password you need not to uninstall your MySQL from pc. Here I will show how to reset root password for MySQL installed in win7.


Steps:


  1. Go to START / CONTROL PANEL and click on Administrative Tools and select Services.
  2. Scroll down and stop Mysql service.
  3. Now go to START / ALL PROGRAMS / ACCESSORIES and right click on Command Prompt – Select RUN as Administrator
  4. Repeat the above step. so that now you have two command-prompts.
  5. In both the command prompt navigate to C:\Program Files\Mysql\Mysql server 5.1\bin>
  6. In first Command prompt window type: mysqld.exe –skip-grant-tables and pressENTER
  7. Go to second Command prompt window and type: mysql.exe –u root mysql and press ENTER, you should be granted access and be in mysql> prompt
  8. Now while at the mysql> type there UPDATE mysql.user SET Password=PASSWORD(‘new password’) WHERE User=’root’ and press ENTER
  9. If everything worked, you should receive QUERY OK …
  10. Now type FLUSH PRIVILLEGES; and press ENTER, you will receive another Query OK
  11. Now you have to just reboot your machine and once you are back you should be able to log on with your new password
Enjoy..

#comment below for any problem in above steps.

0 comments:

Post a Comment

This provides free backlink for you so feel free to comment and get a free backlink.