Recover MySQL Password
Posted by: Lee1313 (---.dsl.lsan03.pacbell.net)
Date: January 30, 2013 01:07PM

I am learning PHP and MySQL on a single system. I failed to record my password for MySQL and now I can not log in. I am running MySQL 5.5.24, PHP 5.4.3 and Apache 2.4.2. Is there a way to recover or replace the password or should I remove WAMP and reinstall it?

Thank you for your help.

Options: ReplyQuote
Re: Recover MySQL Password
Posted by: RiggsFolly (---.as13285.net)
Date: January 30, 2013 05:38PM

Lee,

By far the simplest way is to uninstall wamp, then manually delete all the c:\wamp folder as some files are not removed by the uninstall, the ones you have changed.

Then reinstall, but this will loose any databases you may have created.

So if you have created MYISAM databases which is a normal start point when learning, you can copy those out to somewhere safe before you do the uninstall.

So assuming you have created a database called 'test1' there will be a folder called test1 here

c:\wamp\bin\mysql\mysql5.5.24\data\test1

Save that folder and all its contents somewhere and the copy it back when you have completed the reinstall.

Do this for all the databases you created only, do not save and restore any of the other folders.

Remember to stop the MySQL service which you are backing up and retoring these folders.

Once you have done that you can start MySQL and re-create any users you had other than the 'root' which will already exists but have had its password set back to blank i.e. nothing.

Options: ReplyQuote


Sorry, only registered users may post in this forum.