Bug #74469 mysql_install_db failed to use specified configure.file
Submitted: 21 Oct 2014 4:29 Modified: 30 Jan 2015 8:05
Reporter: zhai weixiang (OCA) Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Installing Severity:S3 (Non-critical)
Version:5.7.5 OS:Any
Assigned to: CPU Architecture:Any

[21 Oct 2014 4:29] zhai weixiang
Description:
suppose I use this command, the default my.cnf rather than the specified one is used.

sudo bin/mysql_install_db --defaults-file=/u01/my575/my.cnf  --datadir=/u01/my575/data --basedir=/u01/my575  --insecure  -uroot

from the output of ps:
/u01/my575/bin/mysqld --no-defaults --bootstrap --datadir=/u01/my575/data --lc-messages-dir=/u01/my575/share --lc-messages=en_US --basedir=/u01/my575

And this command works:

sudo bin/mysql_install_db --defaults-file /u01/my575/my.cnf  --datadir=/u01/my575/data --basedir=/u01/my575  --insecure  -uroot

But from the output of mysql_install_db --help, shouldn't I add "=" while specifying a configure file ?

$bin/mysql_install_db --help | grep '\--defaults-file'
  --defaults-file=name
 

How to repeat:
read above

Suggested fix:
correct the help information
[25 Oct 2014 11:46] Umesh Shastry
Hello Zhai Weixiang ,

Thank you for the report.

Thanks,
Umesh
[25 Oct 2014 11:49] Umesh Shastry
// With --defaults-file=/home/common/bugs/mysql-5.7.5/74469.cnf

[common@ushastry]~/bugs/mysql-5.7.5: bin/mysql_install_db --defaults-file=/home/common/bugs/mysql-5.7.5/74469.cnf --datadir=/home/common/bugs/mysql-5.7.5/data --basedir=/home/common/bugs/mysql-5.7.5 -ucommon -v
2014-10-25 13:42:16 [NOTE]    Creating data directory /home/common/bugs/mysql-5.7.5/data
2014-10-25 13:42:16 [NOTE]    Generating random password to /home/common/.mysql_secret...done.
2014-10-25 13:42:16 [NOTE]    Executing /home/common/bugs/mysql-5.7.5/bin/mysqld --no-defaults --bootstrap --datadir=/home/common/bugs/mysql-5.7.5/data --lc-messages-dir=/home/common/bugs/mysql-5.7.5/share --lc-messages=en_US --basedir=/home/common/bugs/mysql-5.7.5
2014-10-25 13:42:19 [NOTE]    Creating system tables...done.
2014-10-25 13:42:19 [NOTE]    Filling system tables with data...done.
2014-10-25 13:42:20 [NOTE]    Filling help table with data...done.
2014-10-25 13:42:20 [NOTE]    Creating default user root@localhost
2014-10-25 13:42:20 [NOTE]    Creating default proxy root@localhost
2014-10-25 13:42:22 [NOTE]    Success!
[common@ushastry]~/bugs/mysql-5.7.5:
[common@ushastry]~/bugs/mysql-5.7.5: ls -l data/
total 110639
-rw-rw----+ 1 common common 12582912 Oct 25 13:42 ibdata1
-rw-rw----+ 1 common common 50331648 Oct 25 13:42 ib_logfile0 <-------- 48M
-rw-rw----+ 1 common common 50331648 Oct 25 13:42 ib_logfile1 <-------- 48M
drwx------+ 2 common common       79 Oct 25 13:42 mysql
drwx------+ 2 common common       79 Oct 25 13:42 performance_schema
[common@ushastry]~/bugs/mysql-5.7.5:
[common@ushastry]~/bugs/mysql-5.7.5: rm -rf data/
[common@ushastry]~/bugs/mysql-5.7.5:

// With --defaults-file /home/common/bugs/mysql-5.7.5/74469.cnf

[common@ushastry]~/bugs/mysql-5.7.5: bin/mysql_install_db --defaults-file /home/common/bugs/mysql-5.7.5/74469.cnf --datadir=/home/common/bugs/mysql-5.7.5/data --basedir=/home/common/bugs/mysql-5.7.5 -ucommon -v
2014-10-25 13:42:48 [NOTE]    Creating data directory /home/common/bugs/mysql-5.7.5/data
2014-10-25 13:42:48 [NOTE]    Generating random password to /home/common/.mysql_secret...done.
2014-10-25 13:42:48 [NOTE]    Executing /home/common/bugs/mysql-5.7.5/bin/mysqld --defaults-file=/home/common/bugs/mysql-5.7.5/74469.cnf --bootstrap --datadir=/home/common/bugs/mysql-5.7.5/data --lc-messages-dir=/home/common/bugs/mysql-5.7.5/share --lc-messages=en_US --basedir=/home/common/bugs/mysql-5.7.5
2014-10-25 13:43:38 [NOTE]    Creating system tables...done.
2014-10-25 13:43:38 [NOTE]    Filling system tables with data...done.
2014-10-25 13:43:39 [NOTE]    Filling help table with data...done.
2014-10-25 13:43:39 [NOTE]    Creating default user root@localhost
2014-10-25 13:43:39 [NOTE]    Creating default proxy root@localhost
2014-10-25 13:43:40 [WARNING] The bootstrap log isn't empty:
2014-10-25 13:43:40 [WARNING]  100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900
 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900

[common@ushastry]~/bugs/mysql-5.7.5: ls -l data/
total 3904270
-rw-rw----+ 1 common common      27702 Oct 25 13:43 ushastry-bin.000001
-rw-rw----+ 1 common common         19 Oct 25 13:43 ushastry-bin.index
-rw-rw----+ 1 common common   12582912 Oct 25 13:43 ibdata1
-rw-rw----+ 1 common common 1992294400 Oct 25 13:43 ib_logfile0 <-------- 1900M
-rw-rw----+ 1 common common 1992294400 Oct 25 13:43 ib_logfile1 <-------- 1900M
drwx------+ 2 common common         79 Oct 25 13:43 mysql
drwx------+ 2 common common          3 Oct 25 13:43 performance_schema

//

[common@ushastry]~/bugs/mysql-5.7.5: cat 74469.cnf |grep innodb_log*
innodb_log_file_size=1900M
[30 Jan 2015 8:05] Erlend Dahl
[27 Jan 2015 6:23] Georgi Kodinov

m_i_db is deprecated for 5.7. Please consider using mysqld --initialize (scheduled for an upcoming release) that does have the required functionality.