Bug #60889 MySQL "Installer" and "Instantce setup wizard" STILL IGNORE DATA DIR SETTING!!!!
Submitted: 16 Apr 2011 3:25 Modified: 12 May 2016 17:49
Reporter: Kerry Coleman Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL for Windows: Installer Severity:S2 (Serious)
Version:5.6.9 OS:Windows (7, 2008)
Assigned to: CPU Architecture:Any
Tags: configwizard, installer

[16 Apr 2011 3:25] Kerry Coleman
Description:
RIGHT,

SO I am 100% sure this is a dupe, but since the nice new (and i will admit pretty) installer has a "please report bugs" link, I decided to make a NEW one for it!

For the last 8~ months, and PRIOR even to the v5.5 release the MySQL Instance Configuration Wizard, and NOW ALSO the MySQL Installer, have the SAME ANNOYING AS HELL ISSUE... that issue you ask seeing that I am so upset still and have degraded to foul language and being a smartass? 

SIMPLE really: they BOTH ignore the setting for where to place your DATAFILES for MySQL... no matter where you set them, they are always placed in C:\ProgramData\MySQL\MySQL Server #.#\data , you have to MANUALLY stop MySQL, move the files to your desired location, then edit the my.ini file to make this change take effect, then start the MySQL server...

BUT to add something NEW to this ticket, now not only are the DATA FILES for the MySQL server being thrown in there and ignoring the selected dir during the setup phase, its ALSO now throwing the my.ini there as well... GOOD FING GAME...

SERIOUSLY SOMEONE WAKE THE FUCK UP AND FIX THIS S**T...

How to repeat:
Simple, use the Instance Configuration Wizard or the new MySQL Installer and select an alternative "DataDirectory" for your MySQL Data Files, it will be IGNORED (still)
[16 Apr 2011 3:35] Kerry Coleman
+
[16 Apr 2011 3:38] Kerry Coleman
ah, thats funny... 

speaking of the "data files" issue, if you want to put the my.ini back where it goes in the "C:\Program Files\MySQL\MySQL Server 5.5\" directory or anywhere else you would like it, you will need to REGEDIT to modify its service key because thats where the "defaults files" launch line is located at...

there's 2 major bugs for your installer Oracle/Sun, GO GO GO!
[16 Apr 2011 8:13] Peter Laursen
I think you cannot complain about 2)

Docs:
http://dev.mysql.com/doc/refman/5.5/en/option-files.html

On Windows, MySQL programs read startup options from the following files, in the specified order (top items are used first). File Name .. WINDIR\my.ini, WINDIR\my.cnf .. C:\my.ini, C:\my.cnf .. INSTALLDIR\my.ini, INSTALLDIR\my.cnf ..

WINDIR represents the location of your Windows directory. This is commonly C:\WINDOWS. You can determine its exact location from the value of the WINDIR environment variable using the following command: 
C:\> echo %WINDIR%. INSTALLDIR represents the MySQL installation directory. This is typically C:\PROGRAMDIR\MySQL\MySQL 5.1 Server where PROGRAMDIR represents the programs directory (usually Program Files on English-language versions of Windows), when MySQL 5.1 has been installed using the installation and configuration wizards. See The Location of the my.ini File. 

So in case multiple MySQL instances are available on same system the only safe way to ensure that each instance uses the correct configuration file is in my understanding to specify --default-file on the command line - and in case it is a service this will be in the registry key defining the service.

Peter
(not a MySQL person)
[16 Apr 2011 8:25] Kerry Coleman
@Peter:

if this specific instance was not in question, you would be 1/4 right, however with the instance in question, you are sadly mistaken... this is an AUTOMATED type setup, and its not in the program dir, not program files, but program data... but its ok, i understand reading my full posts is a bit... wordy...
[17 Apr 2011 13:03] Valeriy Kravchuk
I wonder what Windows version do you use? I had never seen this on Windows XP, for example, neither 32-bit nor 64-bit.
[17 Apr 2011 14:22] Kerry Coleman
Windows 7 32bit&64bit (and now with SP1)
Windows Server 2008 R2 Standard & Web & DataCenter (also now with SP1)

most post in the forums about this issue, im sure the bug tracker would be flooded if they where all to post here... (its where I found out how to fix this myself the first time it started occurring in the 5.1.4x branch, i believe it was .4x at least...)
[4 Apr 2012 22:13] Kris Oye
This is seriously annoying.  At the very least the installer could pause and let me inspect the resulting INI file (when not running in an automated capacity).  Seriously don't want DB files on my system drive.  This should have been fixed a looong time ago.

datadir was ignored by installer for MySQL 5.5.22 (x86_64) on Windows Server 2008 R2.
[16 Jan 2013 16:39] Matthew Lord
Verified with the latest Windows Installer for MySQL 5.6 (the standalone MSI is no longer provided starting with 5.6).
[1 Apr 2014 7:56] Yngve Svendsen
Changing to correct category.
[12 May 2016 17:49] Javier TreviƱo
Already implemented since 1.4.0