Bug #36493 Windows uninstaller deletes my.ini
Submitted: 4 May 2008 16:47 Modified: 17 Aug 2009 18:38
Reporter: Peter Laursen (Basic Quality Contributor)
Status: Closed
Category:Server: Installing Severity:S2 (Serious)
Version:6.0.4 OS:Microsoft Windows
Assigned to: Iggy Galarza Target Version:6.0-rc
Tags: qc
Triage: Triaged: D1 (Critical)

[4 May 2008 16:47] Peter Laursen
Description:
While working with this
http://bugs.mysql.com/36491

... I found out that the unistaller deletes the my.ini file (in the standard posistion
\prrgram files\mysql\mysql server 6.0)

The my.ini may represent considerable work and accumulated 'knowledge' by user.  It is a
serious flaw to delete it, I believe!

How to repeat:
install - uninstall

Suggested fix:
It seems that the uninstaller simple clears the folder except for the /data subfolder (if
there).  It should only delete spcific files .. and not my.ini!
[4 May 2008 17:08] Valeriy Kravchuk
Thank you for a bug report. Only my*.ini.bak files remains, if any, but my.ini is indeed
deleted. It should NOT be deleted, I think, at least if its modification date/time is
different from installation date/time.
[4 May 2008 17:13] Peter Laursen
I had no my.ini.bak either!

I think that .bak file was created by 'MySQL administrator' at an earlier point of time
where you used MA for altering the configuration!
[4 May 2008 17:30] Peter Laursen
and btw:

you had the feedback here you need!
http://bugs.mysql.com/bug.php?id=36491

It is a flaw with this bugs system that if *the original reporter* does not change status
from *need feedback*, it seems that developers are not notified!
[17 Nov 2008 22:05] Iggy Galarza
Proposed changes

Attachment: bug36493.patch (application/octet-stream, text), 1.47 KiB.

[17 Nov 2008 22:09] Iggy Galarza
MySQLInstanceConfig.exe unconditionally removes the instance's configuration file on
removal.  The proposed changes simply remove this step from the uninstall process.
[17 Nov 2008 23:57] Patrick Crews
Ok to push with a couple of suggestions (that are probably beyond the scope of the bug)

Verified that my.ini file remains after using the REMOVE option of the .msi installer.

Also verified that the saved my.ini file is saved as my<date+time>.ini.bak when the
instance config is used to create a new my.ini file.  

We might want to provide the user a message to let them know that we are renaming their
existing my.ini file to prevent any "Ohmygosh, I just lost my file!" moments.

Another suggestion would be to have the instance config program detect that my.ini
already exists and allow the user to use that and skip certain aspects of the
configuration process.  However, this seems like it would be much more than a trivial
fix.
[17 Nov 2008 23:59] Patrick Crews
One last suggestion:

We might want to provide the user with options for what exactly they want to delete when
using the REMOVE option of the .msi.

They could select exactly what they would like to get rid of and the .msi could respond
accordingly:
Full Remove - remove everything including the data directory
Save data / Save my.ini / etc.

Just a thought concerning usability / friendliness.
[17 Aug 2009 18:38] MC Brown
A note has been added to the respective changelogs: 

Important Change: Uninstalling MySQL using the MySQL installer on Windows would delete
the my.ini file. The file is no longer deleted. In addition, when a new installation is
conducted, any existing cofiguration file will be renamed to myDATETIME.ini.bak during
configuration.