Bug #57093 --install option to mysqld not working if not listed first
Submitted: 29 Sep 2010 10:04 Modified: 29 Sep 2010 10:08
Reporter: Roel Van de Paar (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Installing Severity:S4 (Feature request)
Version:5.1, 5.5.6rc OS:Microsoft Windows
Assigned to: CPU Architecture:Any

[29 Sep 2010 10:04] Roel Van de Paar
C:\mysql556rc\bin>mysqld --defaults-file=c:\mysql556rc\my.ini --install mysql556rc

C:\mysql556rc\bin>net start mysql556rc
The service name is invalid.

error log:
100929 19:53:27 [ERROR] mysqld: unknown option '--install'

C:\mysql556rc\bin>mysqld --install mysql556rc --defaults-file=c:\mysql556rc\my.ini
Service successfully installed.

C:\mysql556rc\bin>net start mysql556rc
The mysql556rc service is starting..
The mysql556rc service was started successfully.

How to repeat:
As per the above
[29 Sep 2010 10:08] Roel Van de Paar
Yet, contradictory, if --install is not used, --defaults-file needs to be the first option:

C:\mysql\bin>mysqld --server-id=5 --defaults-file=c:\mysql\my.ini

Error log:
100929 20:05:31 [ERROR] mysqld: unknown variable 'defaults-file=c:\mysql\my.ini'
100929 20:05:31 [ERROR] Aborting

(Notice the missing dashes also)

Very confusing, especially when the manual says "To work properly, each of these options [including --defaults-file] must immediately follow the command name" - yet clearly --install needs to go before it and not behind.
[29 Sep 2010 10:11] Roel Van de Paar
[29 Sep 2010 10:21] Roel Van de Paar
Looks like it's a documented:

In that case, please update manual at:

To include this exception (--install)
[29 Sep 2010 10:22] Roel Van de Paar
After the docs have been updated, please assign back to me. I'd like to make a FR out of this to have the behavior changed to accept options in any location.
[29 Sep 2010 14:47] Paul Dubois
Documentation updated. Assigning back to Roel per Roel's request.
[30 Sep 2010 22:15] Roel Van de Paar
Feature request (preferably for 5.5): please change the behavior to accept (any) options in any location.