How To Reset MySQL Admin Password In Wndows server?

Collapse

Unconfigured Ad Widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Shane
    Senior Member
    • Jun 2006
    • 264

    How To Reset MySQL Admin Password In Wndows server?

    Hi,

    Please perform these steps to reset windows MySQL server admin password details:

    1) Log on to the Windows System where MySQL is running as Administrator. Stop MySQL server if it is running. Go to the Services manager:
    Start Menu -> Control Panel -> Administrative Tools -> Services

    Find MySQL service in the list and stop it.

    2) Create a text file and place the following command within it on a single line:

    SET PASSWORD FOR root@localhost = PASSWORD(NewPassword);

    Save the file with any name. For example the file will be C:\mysql-pass.txt.

    3) Open the DOS command prompt:
    Start Menu -> Run -> cmd

    4) If MySQL is installed in C:\mysql. At the DOS command prompt execute this command:

    C:\> C:\mysql\bin\mysqld-nt init-file=C:\mysql-pass.txt

    If MySQL is installed in another location, adjust the following commands accordingly

    5) The contents of the file named by the init-file option are executed at server startup, changing the root password. After the server has started successfully.

    6) Stop the MySQL server and restart it in normal mode again. If MySQL server is ran as a service, start it from the Windows Services window.

    7) Connect to MySQL server by using the new password.

    Thanks,

    Shane G.
    AccuWebHosting.Com
    Last edited by admin; 07-23-2015, 10:11 AM.
Working...
X