Follow the below given steps to reset the Mysql root password :
1.Browse to your MySQL installation directory.
2. In there, go to "Data" directory.
3. Find and Open the file named "my.ini"
4. Please ensure that you take a backup of the file "my.ini" prior making any changes. Between the 1st line "[MySQLD]" and 2nd "PORT=" enter "skip-grant-tables"
5. Restart MySQL Service.
You should now be able to login to MySQL prompt without Password.
Once you are at MySQL Prompt,its time to reset the existing password.
Type in
"UPDATE mysql.user SET Password=PASSWORD('New_password') WHERE User='root';"
This will give something like "Query OK, 0 rows affected (0.04 sec)
Rows matched: 1 Changed: 0 Warnings: 0"
7. Type "FLUSH PRIVILEGES;" and hit enter.
You have just reset your MySQL root password.
Now,Do not Forget to undo the changes made in "my.ini" file.
8. Remove "skip-grant-tables" from "my.ini" and restart MySQL Service.
Now you are ready to use your MySQL Service with New Password.
No comments:
Post a Comment