Thursday, 24 September 2009

MySQL password reset in Windows

1. Stop the MySQL service

2. Go to the MySQL installation folder

3. Find the file my.ini

4. Add the line “skip-grant-tables = 1? in my.ini

5. Start MySQL service

6. Now, in command prompt, go to the MySQL bin folder, type ‘mysql’

7. Execute the following command

UPDATE user SET Password=PASSWORD(’YOUR_PASSWORD’) WHERE Host=’localhost’ AND User=’root’;

8. Remove the line “skip-grant-tables = 1? from my.ini

9. Restart MySQL service

No comments:

Post a Comment