- Stop 'MySQL' service if its running (from Service manager or Task Manager)
- Create a text file with the following statements:
UPDATE mysql.user SET Password=PASSWORD('MyNewPass')(Replace 'MyNewPass' with the password you need to use and also change the Username as needed. In the case of plesk installations, the username is usually 'Admin')
WHERE User='root';
FLUSH PRIVILEGES;
'Update' and 'Flush' statements, each should be given in a single line. 'Update' statement updates the root password and 'Flush' statement tells the server to reload the grant tables into memory.
- Save the file
- Start MySQL server special --init-file
optionOn the command window, give the following statement.
C:\>C:\mysql\bin\mysqld-nt --init-file=C:\mysql-init.txt
(Change the paths according to the installation folder)
Restart the service in normal mode.
Reference : http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html