Bug #4444 Configuration file locations
Submitted: 8 Jul 2004 0:03 Modified: 4 Aug 2005 23:00
Reporter: John McGrath Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S4 (Feature request)
Version:4.0.20d OS:Windows (Windows XP)
Assigned to: CPU Architecture:Any

[8 Jul 2004 0:03] John McGrath
Description:
The choice of locations for an option file under Windows seems rather ghastly.  While Unix has user-specific locations for these files, on Windows the only choices available are global: "%WINDIR%\my.ini" and "C:\my.cnf".  (And why are there two different extentions, .ini and .cnf?).

How to repeat:
n/a

Suggested fix:
A reasonable place to look for option files under Windows would be the Windows application data directory.  The environment variable APPDATA points to this directory on recent Windows operating systems.

I would also suggest a somewhat platform-neutral mechanism for specifying the options file:  Allow the user to specify it with an environment variable such as MYSQLOPTIONS.
[30 Jul 2004 16:19] Sergei Golubchik
you can use --defaults-file command-line option to specify the location of my.cnf
[4 Aug 2005 23:00] Jim Winstead
As of MySQL 5.0.9, the ini/cnf files are searched for in:
    1. C:/
    2. GetWindowsDirectory()
    3. GetSystemWindowsDirectory()
    4. getenv(DEFAULT_HOME_ENV)
    5. Directory above where the executable is located