1. Stop your MySQL service.
2. Start your MySQL service with this following command:
mysqld --skip-grant-tables3. Update your root password with this command.
This command will start your MySQL service without checking the users tables everytime users login. So, you can login as root and reset your password.
USE mysql;4. Refresh the users' privileges.
UPDATE user SET password=PASSWORD('new password') WHERE user='root';
FLUSH privileges;
Now, your MySQL root password has been updated with the new password. You can login to MySQL with that new password.
No comments:
Post a Comment