Commit c3e2977
Arun Kuruvila
Bug #16570238: MYSQL_INSTALL_DB IGNORES /ETC/MY.CNF IN 5.6
Description: The "mysql_install_db" utility ignores the
default options specified in the default configuration
files. Consider that the data directory path was specified
in any one of the default file eg. in "/etc/my.cnf", the
values for the options are read from the files in the order
as specified below:
/etc/my.cnf
/etc/mysql/my.cnf
/usr/local/mysql/etc/my.cnf
~/.my.cnf.
Since "mysql_install_db" ignores these files when the
default-file option is not specified and uses the generated
"my.cnf" defaults file in the installation directory.
Hence the data directory resides in the installation
directory after "mysql_install_db". When the mysqld server
is started, it will start scanning the defaults files
specified in the above list and hence would find a
conflicting data directory option value.
Analysis: The "mysql_install_db" utility creates a default
option file named "my.cnf" in the base installation
directory. And this newly created "my.cnf" file is used as
the default-file when "--default-file" option is not
explicitly specified by the user. So this will skip reading
of default options from the configuration files specified
in the above list.
Fix: Whenever default file is not explicitly specified by
the user, newly created "my.cnf" is not set as the
default-file. This will make "mysql_install_db" utility to
read default options from the default configuration files
in the order specified above.
NOTE:- mtr test case is not added since it needs root
permission to create configuration files in default
locations.1 parent 06c9dd7 commit c3e2977
1 file changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
511 | | - | |
| 511 | + | |
| 512 | + | |
512 | 513 | | |
513 | 514 | | |
514 | | - | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
515 | 518 | | |
516 | 519 | | |
517 | 520 | | |
518 | | - | |
| 521 | + | |
519 | 522 | | |
520 | 523 | | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
| |||
0 commit comments