Of course, it is not my post. But I wrote it here for a back up for myself. I got this from some website, it works !


  1. Stop running Mysql service first (Administrative tools > Services )
  2. Open command prompt (cmd) and reach the directory (using CD command) where Mysql bin is installed (eg: C:/Program Files/Mysql/bin)
  3. type mysqld.exe -u root –skip-grant-tables and press enter (don’t close this command prompt)
  4. Open new command prompt and reach the same Mysql bin directory
  5. type mysql and press enter (This time, it never prompts for any passwords and you can enter mysql console)
  6. type command *use mysql *to switch your database into mysql
  7. Execute the usual command to change password for rootUPDATE user SET Password = PASSWORD(‘yournewpassword’) WHERE User = ‘root’;
  8. Close the command prompts and go to services , start mysql. Now you can login with your new root password

Thanks and have a nice day