Bug #58898 mysql_install_db : not all options documented (eg: --defaults-file )
Submitted: 13 Dec 2010 12:22 Modified: 21 Sep 2011 1:37
Reporter: Leandro Morgado Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.1+ OS:Any
Assigned to: Nirbhay Choubey CPU Architecture:Any

[13 Dec 2010 12:22] Leandro Morgado
mysql_install_db reads /etc/my.cnf by default but can be configured to use an alternative defaults file with:

shell> grep defaults-file mysql_install_db 

This is parsed inside the scripts/mysql_install_db but neither of these make any reference to it:

*) http://dev.mysql.com/doc/refman/5.0/en/mysql-install-db.html (or 5.1/5.5 manuals)

*) shell>  man mysql_install_db

*) shell> scripts/mysql_install_db --help

How to repeat:
Read docs

Suggested fix:
Include documentation on how to specify alternative my.cnf for mysql_install_db
[13 Dec 2010 12:34] Valeriy Kravchuk
I think that this page, http://dev.mysql.com/doc/refman/5.1/en/option-files.html#option-file-options, applies to all MySQL programs by default, including mysql_install_db...
[13 Dec 2010 12:39] Leandro Morgado
Yes, I believe so too. However, looking at:


There is no mention of --defaults-file which can leave the less familiar user thinking it's not supported/doesn't exist. We should either add it to this page or place link to:


The same goes for 5.1 / 5.5 manuals.
[13 Dec 2010 12:40] Leandro Morgado
Additionally, if you look at the comments for the mysql_install_db page, you'll clearly see users were looking for this option and didn't find it.
[14 Jan 2011 0: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".
[14 Jan 2011 15:45] Paul Dubois
I suggest that this is not a docs issue -- yet. mysql_install_db itself is broken because its --help message does not display all legal options. I think this is a bug report *first* to fix mysql_install_db to update the --help message, *then* to become a docs issue once the bug reaches the Documenting state.
[14 Jan 2011 15:53] Valeriy Kravchuk
Indeed, this is what we have now:

macbook-pro:5.1 openxs$ bin/mysql_install_db --help
Usage: bin/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.
  --force              Causes mysql_install_db to run even if DNS does not
                       work.  In that case, grant table entries that normally
                       use hostnames will use IP addresses.
  --ldata=path         The path to the MySQL data directory. Same as --datadir.
  --rpm                For internal use.  This option is used by RPM files
                       during the MySQL installation process.
  --skip-name-resolve  Use IP addresses rather than hostnames when creating
                       grant table entries.  This option can be useful if
                       your DNS does not work.
  --srcdir=path        The path to the MySQL source directory.  This option
                       uses the compiled binaries and support files within the
                       source tree, useful for if you don't want to install
                       MySQL yet and just want to create the system tables.
  --user=user_name     The login username to use for running mysqld.  Files
                       and directories created by mysqld will be owned by this
                       user.  You must be root to use this option.  By default
                       mysqld runs using your current login name and files and
                       directories that it creates will be owned by you.

All other options are passed to the mysqld program
[21 Sep 2011 1:37] Paul Dubois
Noted in 5.1.60, 5.5.17, 5.6.4 changelogs.

The help message for mysql_install_db did not indicate that it
supports the --defaults-file, --defaults-extra-file and --no-defaults