• Reset the MYSQL Root Password (Windows)

    To reset the MYSQL root password under windows ,please follow the following steps :

    • Log on to the Windows system where MySQL is running as Administrator.
    • Stop the MySQL server if it is running. For a server that is running as a Windows service, go to the Services manager:
      Start Menu -> Control Panel -> Administrative Tools -> Services
      Then search for the MySQL service in the list, and stop it.
    • Create a text file and add the following  line into it:
      SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘new-password’);Save the file at C:mysql-init.txt
    • open Start Menu -> Run -> cmd
    • Find the location where mysql is installed,As Ex. C:mysqlbin
      C:> C:mysqlbinmysqld-nt –init-file=C:mysql-init.txt
    • Stop the MySQL server, then restart it in normal mode again.
    • Connect to MySQL server by using the new password.

    Categories: Mysql

    Comments are currently closed.