Bug #46258 Windows Install zaps prev. instance, even though basedir is different
Submitted: 17 Jul 2009 9:44 Modified: 7 Dec 2016 15:17
Reporter: Roland Bouman Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.1.36 OS:Microsoft Windows (XP Pro, Vista)
Assigned to: Assigned Account CPU Architecture:Any
Triage: Triaged: D2 (Serious)

[17 Jul 2009 9:44] Roland Bouman
Description:
When installing MySQL 5.1.36 on win xp where a MySQL instance was previously installed, the old instance is zapped, even though the basedir for the new install is entirely different from the basedir of the old instance, and the windows service name for the new service is different from the old one too.

Ironically, the old service is left behind and not cleaned up. 

This behaviour does not make sense. It is entirely unnecessary and uncalled for. What is worse, there is no hint whatsoever during the installation process that this will be the consequence of installing a new instance. 

The reason I explicitly choose another basedir for the new instance is that I want to try it out next to the old one. This behaviour of the installer pretty much defeats the purpose of specifying a custom basedir.

At the very least, leave it up to the user what should be done with the previously installed instance.

How to repeat:
Install some mysql version. Use the msi installer. 

The, install a newer mysql version with the msi installer. Take care to specify different basedir and data dir.

Suggested fix:
Please don't zap my previous instance. At the very least, inform the user that installing a new instance *even in another basedir* will zap the old instance. And, if you do, then do it well and don't leave a rubbish broken service behind. 

This behaviour really makes me unhappy :(
[17 Jul 2009 20:24] Peter Laursen
@roland ..

I have lots of different servers installed on windows, but only one 4.1, one 5.0, one 5.1 etc. I never had this issue. I assume that both were 5.1.x in your case?

But I have another issue.  I have 5.1.36 installed.  I tried to install an older  5.1 version to another basedir and another datadir (I needed it for testing a bug report with our own program).  The MSI rejected me this install as 'there is already a newer version installed'. I had to unistall, install, test and all over again (I could not use MySQL Administrator to configure the service, as it does not work on 64 bit Windows).  I could have started the server as a user program from cmd of course, but it was a .msi version I had available).

I think the are both (yours and my issue) related to MSI Manifest use? I believe it would not happen with NSIS (Nullsoft) installer. And actually I think it may not happen with 5.0 either as it is packaged differently.
[17 Jul 2009 20:31] Roland Bouman
Hi Peter!

yes - correct. I installed 5.1.36, and the intention was to have it running side by side to the existing 5.1.30 development server. Unpleasant surprise...

Anyway - I don't know enough about msi installer organization to be able to deduce why it happened, so you could be right, perhaps that is the underlying cause.

But whatever the cause, I just think it's unexpected and highly undesirable behaviour considering that I supplied radically different directories for the new instance. I at least expected some kind of warning.
[28 Jul 2009 6:47] Susanne Ebrecht
Roland,

many thanks for writing a bug report.

You are right. It is not possible to have several subversions from same version running on Windows.

Also Peter is right here that Windows always just except the actual version.

But I would call it not a bug (expected behaviour) or maximum feature request.

It should be possible to run on same machine at same time all supported MySQL server versions (4.1, 5.0, 5.1, 5.4, 6.0 and NDB).

Please let me know when this won't work, because then we have a regression.

Having i.e. (5.0.45 and 5.0.51) or (5.1.22 and 5.1.30) on same machine is not possible.

When you look to version number x.y.z then z is just for bug fixes and similar stuff and no new features or something like this. If our developers will implement new stuff then minimum of y will change.

You know I am more familiar with Unix/Linux then with Windows but when you look into Linux software (doesn't matter if KDE, Gnome, OpenOffice, vi, emacs, apt, any of the libs (libc, lib...) and so on and so on) ... you always just will be able to install latest z version. It is not possible here too to install version z and version z-n at the same time.

Also when you are using distributer packages on Linux (i.e. install via apt-get) you always will get youngest z version and z-1 version just is not avaiable anymore.

I expect same on Windows ... It should be possible on Windows to install i.e. Java 1.3 and Java 1.6 but it is not possible to install Java 1.3.2 and 1.3.3. Same with IE or whatever else Software is supported on Windows.

There is only one trick to get more then one z version installed on your machine:
Compiling it by your own with corresponding configure and prefix options.

Is it ok for you when I will close this bug report?

Or do you want me to take this as feature request with high chance that development will close (won't fix) it?
[28 Jul 2009 7:54] Peter Laursen
1) I think Roland want a warning that the existing installation will be removed.

2) I also think you are wrong that you cannot have 5.1.30 and 5.1.36 at the same time on Windows.  It is *only* the installer that prevents it. You can have both if you do either
* use MySQL Administrator 'configure service' (but does not work on 64 bit windows :-( )
* use 'sc' command to install service
* edit registry with Regedit and add service to \HKLM\current control set\services
(and if servicename, basedir, datadir and port all are different they will run in parallel)

3) I also think that the reason that MySQL Sandbox is not available for Windows is that it should not be/is not necessary.

Issues reported here by Roland and me are *installer issues* and *only installer issues*. They are not issues with Windows and not with the MySQL server. The installer imposes restrictions on user for no reason.
[28 Jul 2009 7:55] Peter Laursen
1) I think Roland want a warning that the existing installation will be removed.

2) I also think you are wrong that you cannot have 5.1.30 and 5.1.36 at the same time on Windows.  It is *only* the installer that prevents it. You can have both if you do either
* use MySQL Administrator 'configure service' (but does not work on 64 bit windows :-( )
* use 'sc' command to install service
* edit registry with Regedit and add service to \HKLM\current control set\services
(and if servicename, basedir, datadir and port all are different they will run in parallel)

3) I also think that the reason that MySQL Sandbox is not available for Windows is that it should not be/is not necessary.

Issues reported here by Roland and me are *installer issues* and *only installer issues*. They are not issues with Windows and not with the MySQL server. The installer imposes restrictions on user for no reason.
[28 Jul 2009 7:55] Peter Laursen
1) I think Roland want a warning that the existing installation will be removed.

2) I also think you are wrong that you cannot have 5.1.30 and 5.1.36 at the same time on Windows.  It is *only* the installer that prevents it. You can have both if you do either
* use MySQL Administrator 'configure service' (but does not work on 64 bit windows :-( )
* use 'sc' command to install service
* edit registry with Regedit and add service to \HKLM\current control set\services
(and if servicename, basedir, datadir and port all are different they will run in parallel)

3) I also think that the reason that MySQL Sandbox is not available for Windows is that it should not be/is not necessary.

Issues reported here by Roland and me are *installer issues* and *only installer issues*. They are not issues with Windows and not with the MySQL server. The installer imposes restrictions on user for no reason.
[28 Jul 2009 8:33] Peter Laursen
and this "it is not possible to install Java 1.3.2 and 1.3.3" is also not true.

I have 3 different JRE's (one 1.5.x, two 1.6.x) installed on my Vista system (mostly because I still did not get myself together to remove the oldest ones yet). In Windows there is a Control Panel applet where you can switch between which one you want to use. (but not all programs - like OpenOffice - use this applet automatically). If you install a JRE/JDK on Windows the new one will be installed in parallel with the old one. What is actually also very nice I think for people developing Java-based applications.
[28 Jul 2009 8:37] Roland Bouman
Hi Susanne, 

thanks for looking into it.

I know that some software indeed doesn't let you install different minor versions side by side. But don't you that that's just extremely annoying and unneccessary? Typically it is caused beause the installer (or package manager) copies the files to system wide canonical directories, and in that case, indeed it doesn't work so well because of naming conflicts and library dependencies and so on. 

But if you look at the MySQL installer, that simply dumps all in its own directory, and does not copy any dlls to system directories. As of 5.1 something, the data dir tends to be preserved to a system wide All users/application data/MySQL/MySQL 5.1/Data dir, but fortunately you can override that. So I don't see any reason why the old instance should be zapped. 

I have never had an issue with Java in this regard. Sure, the browsers will perhaps use only the plugin of the latest install, but I sure can install the same java in multiple places on my system - up to the user (and fortunately so). Here too, Java lives in its own dir, completely isolated from the rest of the system.

Peter's comment is spot on as far as I'm concerned - it seems an installer issue, it has got nothing to do with the server. If I do a manual install, I can have any number of installations of which ever version I like side by side with no issue.

Perhaps you are right that it is a feature request - something like a checkbox to choose whether the old installation should be cleaned up. I don't have a whole lot of knowledge of the internals of the installation process, but it seems to me no real extra functionality has to be built to support this request.  All functionality is already there, the only thing missing is user control to prevent execution of some of it (clean up old instance)
[29 Jul 2009 10:34] Sveta Smirnova
Thank you for the report.

I agree this is a bug: we should allow users to have so many installations as they want or at least inform them everything will be removed.
[29 Jul 2009 10:41] Roland Bouman
Sveta, thanks :)
[23 May 2012 19:59] Javier Rivera Zavala
Check box warning has been added

Attachment: CheckBoxWarning.png (image/png, text), 83.49 KiB.

[23 May 2012 20:04] Peter Laursen
Roland's report was not about the 'unified installer' but the 'standalone' installer for the server and the server alone. So last comment is totally irrelevant here.
[7 Dec 2016 15:17] Yngve Svendsen
Posted by developer:
 
This relates to EOL (no longer supported) versions of MySQL Server. Furthermore, the old plain msi installers have been superseded by the MySQL Installer for Windows. Thus closing.