Bug #80926 mysqld_multi doesn't pass through defaults file related options
Submitted: 31 Mar 2016 15:17 Modified: 1 Apr 2016 9:28
Reporter: Hartmut Holzgraefe Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:mysql.5.7.11, all OS:Linux
Assigned to: CPU Architecture:Any

[31 Mar 2016 15:17] Hartmut Holzgraefe
mysqld_multi parses the --defaults-file=... option just fine and reads from the given file instead of reading the global default under /etc

It does not pass on that option to the mysqld instances it starts, and so the mysqld processes read the global default my.cnf for options that were not set by mysqld_multi itself via command line options.

This can lead to confusing situations as the mysqld processes now might be using settings that were not specified in the [mysqld] section of the options file given to mysqld_multi via its --defaults-file option.

As a workaround it is possible to put a "defaults-file=..." onto the first line of each [mysqld#] server block int the mysqld_multi configuration file.

The manual page doesn't really specify how this should work, it has this paragraph though:

"The [mysqld] or [mysqld_safe] groups can be used for common options read by all instances of mysqld or mysqld_safe. You can specify a --defaults-file=file_name option to use a different configuration file for that instance, in which case the [mysqld] or [mysqld_safe] groups from that file will be used for that instance. "

I tend to interpret that as "The [mysqld] ... group ... of the same file that mysqld_multi was reading".

Also the the "You can specify a --defaults-file=file_name option" part is not really clear, it probably refers to putting this into the server specific [mysqld#] option, in which case the double dash prefix should be removed and it should clearly be stated that this needs to be the very first option in a [mysql#] option

How to repeat:
See above

Suggested fix:
* Pass through --defaults-file option value to all started mysqld instances, unless a different defaults-file entry was found in the instance specific [mysqld#] block

* be more clear about option file handling of started instances in the documentation
[1 Apr 2016 9:28] MySQL Verification Team
Hello Hartmut,

Thank you for the report.
Observed this with 5.7.11 build.