Bug #69834 mysql_install_db ignores options defined in template
Submitted: 25 Jul 2013 2:02 Modified: 3 Nov 2013 17:29
Reporter: Alfie John Email Updates:
Status: No Feedback Impact on me:
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.6.12 OS:Linux
Assigned to: CPU Architecture:Any
Tags: installation, mysql_install_db

[25 Jul 2013 2:02] Alfie John
mysql_install_db uses a template (support-files/my-default.cnf) for its initial bootstrap. Currently the documentation omits the --defaults-file parameter in order to override options for the bootstrap, so the only way around this is to make changes within the template itself. However options set in the template are ignored.

How to repeat:
- Change the filesize of innodb_data_file_path within the template and run mysql_install_db.
- Observe the ibdata1 filesize.
- R mysql_install_db --defaults-file support-files/my-default.cnf
- Observer that the ibdata1 filesize is different.

Suggested fix:
The template values are parsed into @default_options but are not included when creating $mysqld_install_cmd_line. A fix would be to include these values.
[3 Oct 2013 17:29] Umesh Shastry
Hello Alfie,

Thank you for the report.
Could you pls try --defaults-file=name option with mysql_install_db? 
"name" should be the conf file with preferred settings. 

// On my local box I can pass my own my.cnf

mysql-5.6.14-release]# scripts/mysql_install_db --help
Usage: scripts/mysql_install_db [OPTIONS]
  --basedir=path       The path to the MySQL installation directory.
  --builddir=path      If using --srcdir with out-of-directory builds, you
                       will need to set this to the location of the build
                       directory where built files reside.
  --cross-bootstrap    For internal use.  Used when building the MySQL system
                       tables on a different host than the target.
  --datadir=path       The path to the MySQL data directory.
                       If missing, the directory will be created, but its
                       parent directory must already exist and be writable.
                       Read this file after the global files are read.
  --defaults-file=name Only read default options from the given file name.
[4 Nov 2013 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".