Locked yourself out of MySQL: reset the root password

I was totally shocked when I tried to open the mysqladmin in Wamp server and accidentally did not set the root password for mysql and it failed to log me in. I Googled a bit, an luckily I found the right solution for it from this great blog http://www.jovicailic.org/2012/04/reset-forgotten-mysql-root-password-under-windows/ .  The gist is, you need to stop mysql server and restart it with –skip-grant-tables option. This will stop all authentication for accessing tables and allow you to reset the root password. More in the link itself. Thanks to the author Jovica Ilic.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s