I forgot the root password for MySQL 5.5 command line client in Windows 7. I am unable to login. How can I retrieve the password or reset?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
RTM : http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
Here’s a step by step procedure :
Important : you need to have system administrator privileges on windows.
1- Stop your MySQL server
2- Create an empty text file, and put these statements in :
You may replace the string ‘MyNewPass’ by your own password.
3- Save the text file. (eg. c:\temps\mysql-reset-pass.sql )
4- Restart MySQL server and tell it to load the file :
Depending on your MySQL installation, you may also need to give the path to your ini file. In this case, add the “–defaults-file” switch
5- Restart the server normally. You should be able to connect using your new password
Remembrer to delete the text file that you’ve just created in step 2. It contains the password in clear text.