Re-installation of MySQL 5.x

A friend of mine recently had an issue while installing MySQL 5.1.34 on a Windows 2003 R2 system using the binary installer. All seemed to have gone well with the install except that when it was done he couldn’t log into the database as root. Obviously, we thought that the password was wrong, so we tried to reset it using mysqladmin using the command:

c:\> mysqladmin -u root flush-privileges password <new-password>

However this did not work, even after restarting with the –skip-grant-tables option set. So the next course of action was to re-install. The current installation was removed using the uninstall option and the mySQL folder created on the C:\Program Files folder was junked. 

The re-install started with no problems but curiously remembered all the previous settings (sign of problems to come!). The install completed but configuration failed with the wizard unable to apply security settings because the password was incorrect. Apparently it seems that the password is stored somewhere that was not removed in the previous uninstall.

In the end the following steps worked for completely removing and re-installing:

  1. Perform un-install using wizard
  2. Manually remove the service if still installed
  3. Delete folder C:\Program Files\MySQL
  4. Delete C:\Windows\my.ini
  5. Delete the MySQL folder in Application Data. The actual Application Data folder will depend on the user performing the installation
  6. Re-install
Share this post:
  • Print
  • email
  • Facebook
  • Twitter
  • Tumblr
  • del.icio.us
  • Digg
  • Reddit
  • Sphinn

Related Posts

This entry was posted in Databases, MySQL and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.
blog comments powered by Disqus
  • Subscribe to my feed Subscriber via Email Follow Me on Twitter! Check me out on Facebook! Check me out on LinkedIn!