Bug #23861 Uninstalling MySQL leaves root password
Submitted: 1 Nov 2006 22:18 Modified: 23 Apr 2008 21:37
Reporter: Jared S (Silver Quality Contributor) Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:5.0.52,5.1.22 OS:Windows (Any)
Assigned to: CPU Architecture:Any
Tags: config wizard, password, reinstall, root

[1 Nov 2006 22:18] Jared S
Description:
Hi,

Simple issue that must be effecting everyone else.  When Reinstalling MySQL after unistalling MySQL (with a root password).  The config wizard bombs out with password error cause it assume that the is first configuration.

WORKAROUND:  Open Administrator and change password while configuring the wizard.

Couple this with bug 23821 turns my life into quite a mess.

How to repeat:
> install MySQL 5.0.27 with a root password
> now unistall that
> install MySQL 5.0.27 and try to configure 

The configuration wizard fails because it is not detecting previous password.

Suggested fix:
I think it would be best if you cleared the root password information after unistall of server since programming intellegince like that into configure wizard turn into horrible re/configure combination mess.
[1 Nov 2006 22:31] Jared S
Picture of the problem

Attachment: passerror.JPG (image/pjpeg, text), 38.98 KiB.

[2 Nov 2006 10:18] Valeriy Kravchuk
Thank you for a problem report. Please, describe all the steps, exactly, you performed when re-installing 5.0.27. Have you tried to modify security settings?
[3 Nov 2006 0:23] Jared S
This is a pretty simple issue.  As described before..

How to repeat:
> install MySQL 5.0.27 
> use configuration wizard to configure 'standard' with root password='pass'
> unistall MySQL 5.0.27 
> use configuration wizard to configure and when script starts executing it will fail.

I have found a work around to this issue by deleting MySQL folder and rebooting combuter during installations.
[3 Nov 2006 14:02] Valeriy Kravchuk
Do you use the same 'standard' configure path when installing for a second time?
[3 Nov 2006 20:49] Jared S
When you run the configuration wizard it gives you a choice of 'standard' or 'detailed' I always choose standard cause it has least options and is easiest.

Have you tried to repeat?

Have you taken look at the picture attached?
[28 Nov 2006 12:24] Valeriy Kravchuk
Even "Standard Configuration" option gives you dialog boxes with options to choose Service Name, and, then "Modify Security Settings" checkbox. If not checked (it is checked by default), it allows you to start service without error like in your screenshot. 

So, looks like you left "Modify Security Settings" checkbox checked, but not provided new root password... Please, confirm.
[28 Nov 2006 21:46] Jared S
Wizard Security Settings

Attachment: Image1.GIF (image/gif, text), 25.11 KiB.

[28 Nov 2006 21:52] Jared S
Hi,

How could I not provide a password if the wizard 'Next' is grayed out until you enter a password.

This still is a bug but I suppose it could be avoided by leaving all existing security settings the way they are.

Since I am now more educated on this bug.  I am going to change it to a bug/request, and my bug/request is..

Add a current password box to the 'configure new instance' which runs directly after re-install.  NOTE this is NOT the 'reconfigure' wizard from the start menu.

Again, steps to reporoduce this bug could not be any clearer..

1. Install MySQL Server and configure with password
2. Uninstall that
3. Install MySQL Server and configure with password

Error page come up during configuring.
[29 Nov 2006 0:19] Valeriy Kravchuk
So, with "Modify Security Settings" checkbox checked (by default), if you enter new password, service will not start, witrh error 1045. It is a bug (service is started really!) in Config Wizard. 

At least, "Modify Security Settings" should be not checked by default.
[20 Dec 2007 15:38] Patrick Crews
What's happening is that the configuration wizard doesn't recognize that there is a previous root password and doesn't give the user a prompt for entering the existing password (as it does on a reconfigure).

The user is only presented with the new password and re-enter password entry fields.  

When you try to execute the final step of the config. process, it's trying to not use a password for root and will fail (because of the previous, unremoved password from the 'removed' instance).

If you exit the configure process and restart it, you will then be presented with an prompt for the previous password.  If you enter that and the new password, everything will work correctly.

If we can't completely remove the root password information on a 'remove' via the instance config wizard, we should at least make the wizard detect that password information is out there and prompt the user to enter it to make the process smoother.

I don't know how much trouble it would cause to remove the previous password, but this seems the better option -- what if a user played with MySQL, removed it, forgot the password and then reinstalled later?  They would be in trouble.  If a user chooses to work with the .msi wizards, everything should be taken care of through that -- not having to dig in and manually remove information.
[20 Dec 2007 18:28] Jared S
I agree with previous comment.  Updated bug details.
[23 Apr 2008 21:37] Patrick Crews
Closing this out as a duplicate bug.  (even though this one came first)

Bug #24215 also addressed this problem and a fix was added to the Instance Config Wizard to detect if a previous password exists and to prompt the user for it if detected.

Might also want to examine Bug#36305 for some behavior related to this change.
[17 Mar 2011 16:57] masi pay
I am having the same problem with 5.5.10 on Vista.
On reinstall , prompt the old root password, even with right password,or changing the new password to something diff and all other options reinstall doesn't work.

On repeated attempts, one of them including: remove instance on conf wizard, it stopped prompting the old root password and input options were for new pass and confirm but still , the configuration gets stuck on 'Start service' after 'Prepare configuration' > 'Write configuration file'.

Obviously this issue has been reported as a bug, at least as we see here, on 5.0.5 but it still has not been fixed to the latest version 5.5.10 that I am having problem with.

This problem seems to be occurring not only on windows but on Linux and mac as well as I h ave seen on other forums.
What is the fix? 
--------
my facts: on Vista
Uninstall mysql, 
delete C:/MySql Datafiles folder, 
delete C:/Program files/MySql  folder,

Now neither can I run MySql nor can I reinstall even with right Old ROOT password. If you had forgot the old root pass I can't even imagine what you would be going through.

I also know one fact that, people who post bugs and problems such as this one, after lot of mind storm find a fix but they never come back to their own post to post the fix. I only mean to ask the previous posters here whether they have found a fix.
[9 Sep 2011 9:20] Shital Rawal
Hi Guys,

I had similar issue. 

Trying to uninstall MYSQL V 5.5 on Windows 7. 

After 18 hrs of head banging, finally found a solution. 

Follow this:

Using Windows 7, here's what I had to do:

•Uninstall MySQL using the uninstaller 
•Delete C:\Program Files\MySQL 
•Delete C:\Program Files (x86)\MySQL
•Delete C:\ProgramData\MySQL 
•Delete from any Users' AppData folders. Example: C:\Users\rdoverby\AppData\Roaming\MySQL
•Reinstall MySQL

And it worked...I could reinstall MySQL on my machine again...

Enjoy!!!!!
[2 Feb 2012 2:56] Michael Crawford
Re [9 Sep 2011 9:20] Shital Rawal 

Had similar problem under XP.  Followed your advice, removed all the directories from the previous install plus all MySql directories/data within Documents and Settings (ie in lower level directories).  Reinstall then worked fine.  Thanks.
[13 Apr 2015 21:04] Peter Walton
Shocking that 9 years after this issue has been reported it's still not repaired. deleting of the mysql folder within my Programs and appdata sections ( hidden ) still does not resolve the root password lock either. I never use mySQL and today I remember why :)