Reset MySQL Root Password on Windows (Wamp Server)

If you forgot the password for MySQL Root, then you need following the online instruction.

  1. I saved the update password and flush command to “resetpw.txt”
  2. Launch command prompt as an administrator.
  3. “C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld” –defaults-file=”C:\Program Files\MySQL\MySQL Server 5.1\my.ini” –init-file=D:\\resetpw.txt –console
  4. I included –console so that I can see any error right away.
  5. After I reset the MySQL server, I verified by running a command prompt and typed “mysql –u root –p” and entered the password when prompted.

==================
resetpw.txt  
=================
yourpassword

No comments:

Post a Comment