Bug #26795 Installer doesn't handle service from 5.0 nicely
Submitted: 2 Mar 2007 14:54 Modified: 29 Jul 2008 14:59
Reporter: Olaf van der Spek (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.0.37 OS:Windows (Windows XP)
Assigned to: MC Brown CPU Architecture:Any
Tags: qc

[2 Mar 2007 14:54] Olaf van der Spek
Description:
I've been running 5.0 and now installed 5.1.16. The installer uses a new directory, but uses the same non-versioned service name (just mysql).

Then in the Instance Configuration Wizard, it says "A Windows service with the name MySQL already exists. Please uninstall this service correctly or choose a different name for the new service.

So I uninstalled 5.0 completely, the service is gone from Config Panel - Services, but the error remains. I guess the wizard doesn't recheck. :(

How to repeat:
Install 5.1 over 5.0 has been installed and don't uninstall 5.0 until the installer complains about the service name.

Suggested fix:
Recheck whether the service exists already.
[3 Mar 2007 19:58] Valeriy Kravchuk
Thank you for a problem report. This may be related to Bug #26499. Please, check.
[3 Mar 2007 20:16] Olaf van der Spek
I don't see any relation.
[13 Apr 2007 13:02] Valeriy Kravchuk
Please, try to repeat with a newer version, 5.1.17, and inform about the results. In case of the same problem, please, after complete deinstallation of 5.0, check if there still any keys with MySQL value in the registry.
[13 Apr 2007 20:23] Olaf van der Spek
> Please, try to repeat with a newer version, 5.1.17, 

Why? Did you fix anything?

I've tried, but the same problem occurs. I have to cancel and restart the Instance Configuration Wizard.

Then, the wizard detects both 5.0 and 5.1 although I've just uninstalled 5.0.
[14 Apr 2007 16:58] Valeriy Kravchuk
The problem is caused by the fact that upon uninstallation of 5.0.x (up to 5.0.37) not all entries for the service used (MySQL or any other name used) are removed from the registry. For example, in my case I had found:

My Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet003\Services\MySQL5

Then any other installation that tries to use the same service name can not do it, as this service name already mentioned in some parts of the registry. This is a verified bug in 5.0.37.
[19 Apr 2007 7:25] Michael G. Zinner
During installation MySQL 5.0 and MySQL 5.1 are defined to be completely separate products that do not relate to each other. The reason for that is that developers can have a 5.0 and 5.1 installed in parallel on their machine and run their applications against both versions. (In contrast of running a simple update from e.g. 5.0.38 to 5.0.40)

This means that you have to choose a different service name for 5.1 if you already have 5.0 installed. As you noticed, the Configuration Wizard will warn you if you have already installed a service with the given name. If you ignore this warning and install the 2nd server with the same name you will get an inconsistent configuration that can only be fixed manually by removing the service entries from the registry (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services) and reconfiguring the servers.

Please choose different service names in the Configuration Wizard, most commonly used are mysql5 and mysql51.

Sorry for the confusion, I will check with the documentation team to make this more clear in the manual.

Mike
[19 Apr 2007 7:30] Michael G. Zinner
Just a notice on the service name that did not get removed. If you install 5.1 with the service name "mysql" over 5.0 with the same service name and then remove 5.0 this also results in an inconsistent setup.

So my question would be, did you abort the 5.1 setup once you got that warning, or did you continue and then remove the 5.0?

Thanks,
Mike
[19 Apr 2007 7:47] Olaf van der Spek
When I got the error (you can't continue) I uninstalled 5.0. However, I still couldn't continue.
So I aborted the config wizard, immediately restarted it and then I could continue.

So it appears it only checks once if the service name is available, while it should recheck.
[20 Apr 2007 6:13] Valeriy Kravchuk
This is still either a bug or, at least, a valid documentation request.
[29 Jul 2008 14:59] MC Brown
The documentation has been updated to make it clear that when installing multiple versions of MySQL that you should choose a unique service name to prevent installation and deployment issues.