How to reset MySQL root password without old root password in Windows server?

Collapse

Unconfigured Ad Widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Marc_AccuWebHosting
    Member
    • Jun 2015
    • 56

    How to reset MySQL root password without old root password in Windows server?

    Problem Statement

    How to reset MySQL root password without old root password in Windows server?

    Following are the steps to reset MySQL root password without old root password in Windows server:
    1. Stop MySQL Service from Windows Server.Start ->Administrative Tools -> Services.
      Locate MySQL service and stop it.
    2. Open command prompt.Click on Start -> Run -> cmd.
    3. Go to MySQL installation directory i.e. C:\Program Files\MySQL\MySQL server 5.1\
    4. Go to Bin directory.
    5. Run command mysqld.exe – skip-grant-tables.
    6. Now, leave this command prompt window open.
    7. Open new command prompt window and go to bin directory of MySQL installation.
    8. Type command mysql, it should prompt you to mysql console.
    9. Type command use mysql.
    10. Type command

      UPDATE mysql.user SET Password=PASSWORD('MyNewPassword') WHERE User='root'; (where MyNewPassword should be the new password you wish to reset).

    11. Type command FLUSH PRIVILEGES.
    12. Start MySQL service.
    13. It should reset your MySQL password and you should be able to login as a root using the new password you have set for MySQL.
    Last edited by Marc_AccuWebHosting; 06-08-2015, 04:10 AM.
Working...
X