While the above problem is different and all we need to do is just stop the service before reinstalling the mysql instance.
The below solution worked for me as I was getting error 1045 while installing MySQL:-
While trying to install MySQL instance, I deleted almost everything I could see e.g. a folder in Program files, searched any entry starting with MySQL in the Search option and deleted them as much as possible. Also cleared the registry and deleted MySQL service again n again. All this didn't work.This happened for weeks.
And then I checked the machine of my friend who successfully installed it and found out that there is a folder called Application Data in Documents & settings/All users and this folder contained MySQL folder with two previously installed instances.
Deleted them and now I'm a happy user
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com