Bug #53667 | Command line tools should describe --no-defaults option in --help | ||
---|---|---|---|
Submitted: | 15 May 2010 4:23 | Modified: | 18 May 2010 4:06 |
Reporter: | FirstName LastName | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: General | Severity: | S3 (Non-critical) |
Version: | 5.1.45 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[15 May 2010 4:23]
FirstName LastName
[15 May 2010 7:51]
Valeriy Kravchuk
Why not to use --no-defaults option at installation stage and explicit --defaults-file=/path/to/my.cnf in all other cases and/or --defaults-extra-file=/path/to/overwritemy.cnf? This is a kind of a workaround for many cases. As http://dev.mysql.com/doc/refman/5.1/en/option-files.html described current behaviour clearly, I'd declare this a feature request.
[15 May 2010 13:42]
FirstName LastName
How can --no-defaults be invoked ? Against which tools ? # This comes up empty $ mysql_install_db --help | grep defaults # And this does not show this feature available: $ ./configure --help|grep -i defaultsDefaults for the options are specified in brackets. CCAS assembler compiler command (defaults to CC) CCASFLAGS assembler compiler flags (defaults to CFLAGS)
[15 May 2010 14:53]
Valeriy Kravchuk
--no-defaults can be used wiht mysql_install_db (or any mysql command line tools, even if their --help command does not say this). Had you tried to use it? Look: valeriy-kravchuks-macbook-pro:5.1 openxs$ cat /etc/my.cnf [mysqld] datadir=/tmp/mysql valeriy-kravchuks-macbook-pro:5.1 openxs$ ls /tmp | grep mysql valeriy-kravchuks-macbook-pro:5.1 openxs$ rm -rf var/* valeriy-kravchuks-macbook-pro:5.1 openxs$ ls var/ valeriy-kravchuks-macbook-pro:5.1 openxs$ bin/mysql_install_db Installing MySQL system tables... OK Filling help tables... OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /Users/openxs/dbs/5.1/bin/mysqladmin -u root password 'new-password' /Users/openxs/dbs/5.1/bin/mysqladmin -u root -h 77-52-28-215.dialup.umc.net.ua password 'new-password' Alternatively you can run: /Users/openxs/dbs/5.1/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. You can start the MySQL daemon with: cd /Users/openxs/dbs/5.1 ; /Users/openxs/dbs/5.1/bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd /Users/openxs/dbs/5.1/mysql-test ; perl mysql-test-run.pl Please report any problems with the /Users/openxs/dbs/5.1/bin/mysqlbug script! valeriy-kravchuks-macbook-pro:5.1 openxs$ ls var/ valeriy-kravchuks-macbook-pro:5.1 openxs$ ls /tmp | grep mysql mysql valeriy-kravchuks-macbook-pro:5.1 openxs$ ls /tmp/mysql/ mysql test So, as you can see, /etc/my.cnf setting is used by default by mysql_install_db, but let's try to use --no-defaults option: valeriy-kravchuks-macbook-pro:5.1 openxs$ rm -rf /tmp/mysql valeriy-kravchuks-macbook-pro:5.1 openxs$ ls /tmp | grep my valeriy-kravchuks-macbook-pro:5.1 openxs$ bin/mysql_install_db --no-defaults Installing MySQL system tables... OK Filling help tables... OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /Users/openxs/dbs/5.1/bin/mysqladmin -u root password 'new-password' /Users/openxs/dbs/5.1/bin/mysqladmin -u root -h 77-52-28-215.dialup.umc.net.ua password 'new-password' Alternatively you can run: /Users/openxs/dbs/5.1/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. You can start the MySQL daemon with: cd /Users/openxs/dbs/5.1 ; /Users/openxs/dbs/5.1/bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd /Users/openxs/dbs/5.1/mysql-test ; perl mysql-test-run.pl Please report any problems with the /Users/openxs/dbs/5.1/bin/mysqlbug script! valeriy-kravchuks-macbook-pro:5.1 openxs$ ls /tmp | grep my valeriy-kravchuks-macbook-pro:5.1 openxs$ ls -l var total 0 drwx------ 71 openxs staff 2414 15 тра 17:48 mysql drwx------ 2 openxs staff 68 15 тра 17:48 test valeriy-kravchuks-macbook-pro:5.1 openxs$ pwd /Users/openxs/dbs/5.1 So, with this option mysql database is created in var subdirectory of a directory set using --prefix option of configure while building.
[15 May 2010 20:38]
FirstName LastName
Calling mysql_install_db with --no-defaults works. I would recommend this feature is reported with this tool is invoked with --help.
[17 May 2010 22:05]
Omer Barnir
Seems from discussion issue was resolved
[18 May 2010 1:02]
FirstName LastName
I want to point out that the issue has __NOT__ been resolved. The issue is that --no-defaults is not documented under "mysql_install_db --help". That at least is a documentation bug. For this issue to be resolved mysql_install_db should report the --no-defaults option when executed with --help.
[18 May 2010 4:06]
Valeriy Kravchuk
So, mysql_install_db (and other command line tools) should describe --no-defaults option in --help results. This is a minor problem to fix. I've changed synopsis accordingly.