Bug #11192 | mysqld_safe only evaluates --defaults-file option when it is the first option | ||
---|---|---|---|
Submitted: | 9 Jun 2005 5:03 | Modified: | 14 Feb 2017 8:39 |
Reporter: | [ name withheld ] | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S3 (Non-critical) |
Version: | 4.x, 5.x | OS: | Linux (Linux) |
Assigned to: | CPU Architecture: | Any |
[9 Jun 2005 5:03]
[ name withheld ]
[9 Jun 2005 11:55]
MySQL Verification Team
This is the expected behavior and in several places is mentioned on the manual i.e:: http://dev.mysql.com/doc/mysql/en/innodb-configuration.html ........ If you want to make sure that mysqld reads options only from a specific file, you can use the --defaults-option as the first option on the command line when starting the server: ......
[9 Jun 2005 21:46]
[ name withheld ]
Fair enough. But I would expect this behaviour to be mentioned in the documentation for mysqd_safe. That's the page, I looked up to figure out what my problem is. After all, if I am not using InnoDB, why should I look at the InnoDB configuration documentation. No biggy, but such little things can be annoying. I would have had to search your whole site to find the required information, would I not have been able to understand the shell script code in mysqld_safe, to find the cause of the problem. Anyway, it's a great database. Frank
[8 Dec 2009 3:55]
Roel Van de Paar
'This must be the first option on the command line if it is used.' http://dev.mysql.com/doc/refman/5.1/en/mysqld-safe.html#option_mysqld_safe_defaults-file Can we also include this in the --help option? Usage: ./mysqld_safe [OPTIONS] --defaults-file=FILE Use the specified defaults file --defaults-extra-file=FILE Also use defaults from the specified file It is currently listed as a standard option, not specifying it should be used as the first option.
[3 Oct 2014 10:09]
Hartmut Holzgraefe
the "mysql" and "mysqladmin" command line tools (and others like "mysqlbinlog" probably also) list these options in an extra section at the end of the options list in --help output: [... list of regular options ...] Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql-5.6.20/etc/my.cnf ~/.my.cnf The following groups are read: mysql client The following options may be given as the first argument: --print-defaults Print the program argument list and exit. --no-defaults Don't read default options from any option file, except for login file. --defaults-file=# Only read default options from the given file #. --defaults-extra-file=# Read this file after the global files are read. --defaults-group-suffix=# "mysqld_save" (which as a shell script doesn't use the default cmdline parser from libmysqlclient) just prints them intermixed with other options ... should have them separate the same way as the compiled command line tools do ...
[14 Feb 2017 8:38]
Terje Røsten
Posted by developer: mysqld_safe --help now prints: Usage: bin/mysqld_safe [OPTIONS] The following options may be given as the first argument: --no-defaults Don't read the system defaults file --defaults-file=FILE Use the specified defaults file --defaults-extra-file=FILE Also use defaults from the specified file Other options: --ledir=DIRECTORY Look for mysqld in the specified directory Docs: https://dev.mysql.com/doc/refman/5.5/en/mysqld-safe.html also includes link to https://dev.mysql.com/doc/refman/5.5/en/option-file-options.html which describe special treatment of these options. (Change was done with fix of Bug#83937/Bug#25144379).
[15 Feb 2017 1:13]
Paul DuBois
Posted by developer: Noted in 5.5.55, 5.6.36, 5.7.18, 8.0.1 changelogs. The --help message for mysqld_safe was corrected to mention that the --no-defaults, --defaults-file, and --defaults-extra-file options, if given, must be the first argument.