Monday 11 January 2010

I survived MySQL (re-)installation!

Ever got the opportunity to experience the installation of MySQL Server 5.1 on your own system? Well yours truly recently went through the ordeal.

The thing is it's not an ordeal if it is a clean first time install but consider the case when you or someone else installed it on your machine a few weeks/months ago and now you don't have access to the root password. What would you do then? MySQL server installer is programmed in a way (apparently to preserve the security of the database) that it doesn't let you proceed unless you know that goddamn old root password (which many a times turns out to be the sys-admin's girlfriend's name). Even an uninstallation followed by attempted clean installation doesn't help. So now one is stuck! What do we do?


Problem Statement:  To hell with the old DB and perform a clean installation of MySQL Server 5.1, bypassing the root password requirement.

Hack:

Step 1: Run the installation. Hit the last page. Encounter the error. Close.

Step 2: Go to the 'Application Data' folder on your Windows installation drive (usually C:) and Shift+Delete the MySQl folder there.

Step 3:  Go to the 'Program Files' folder on your Windows installation drive (usually C:) and Shift+Delete the MySQl folder there.

Step 4: Go to HKLM/Software/MySql registry key: and reset all of them to '0'.

Step 5: Restart your system.

Step 6: Re-install. Now it goes through smoothly!

Result: You are able to reinstall a fresh copy without formatting your system :D!

Sit back. Relax. Glory to MySQL! World's most popular open source DB.

2 comments:

ArkAngel said...

Awesome!

Our stop shop for geeky solutions by the GeekGod-in-the-making himself!!

:)

mondodello said...

Lol! High hopes :D!