Ken
2007-10-25 23:46:35 UTC
I recently had some difficulty with the --defaults-extra-file flag so
I thought I'd share my experiences and point out an area where the
documentation can be improved. All of the following pertains to MySQL
5.0.45
I wanted to avoid putting my password on the command line so I read
the mysql(1) man page regarding the --password flag. It refers me to
6.6, "Keeping Your Password Secure". Section 6.6 is actually, "Disk
Issues" so I turn to section 5.8.6 and get to "Keeping Your Password
Secure". [1] After reading this section, I decide that I'd like to
use an option file to store my password and pass the name of the
option file on the command line. I turn to section 4.3.2, "Using
Option Files" which introduces me to the --defaults-extra-file. Here
are some command lines.
Original Command Line
mysql --user=user --password=password ...
New Command Line (after reading 4.3.2)
mysql --user=user --defaults-extra-file=mysql.cnf ...
The first command works and the second gives me this error.
mysql: unknown variable 'defaults-extra-file=mysql.cnf' [2]
I pore through the manual looking for clues to no avail. I read the
man page for mysql and it doesn't even mention the flag. [3] I try
`mysql -?` but my shell expands the ? and I get an error. mysql --
help finally leads me to the answer when it lists --defaults-extra-
file under the heading, "The following options may be given as the
first argument:". Now my command line looks like this and it works.
mysql --defaults-extra-file=mysql.cnf --user=user ...
This working command is astonishingly similar to the command which
gives an error. I have two nagging questions.
- Why must this flag be first on the command line?
- Why is this not documented in section 4.3.2? [4]
The following requests are addressed to a steward of the MySQL product
if one is listening.
[1] - Please update the man page near the description for --password,
replacing 6.6 with 5.8.6 to correct the section number for "Keeping
Your Password Secure".
[2] - Please add a more descriptive error message indicating that the
--defaults-extra-file flag must be first when displaying the error
message, "mysql: unknown variable 'defaults-extra-file=arg'".
[3] - Please add --defaults-extra-file to the man page.
[4] - Please add the the necessity for --defaults-extra-file to be
first to section 4.3.2 of the manual.
Ken Smith
I thought I'd share my experiences and point out an area where the
documentation can be improved. All of the following pertains to MySQL
5.0.45
I wanted to avoid putting my password on the command line so I read
the mysql(1) man page regarding the --password flag. It refers me to
6.6, "Keeping Your Password Secure". Section 6.6 is actually, "Disk
Issues" so I turn to section 5.8.6 and get to "Keeping Your Password
Secure". [1] After reading this section, I decide that I'd like to
use an option file to store my password and pass the name of the
option file on the command line. I turn to section 4.3.2, "Using
Option Files" which introduces me to the --defaults-extra-file. Here
are some command lines.
Original Command Line
mysql --user=user --password=password ...
New Command Line (after reading 4.3.2)
mysql --user=user --defaults-extra-file=mysql.cnf ...
The first command works and the second gives me this error.
mysql: unknown variable 'defaults-extra-file=mysql.cnf' [2]
I pore through the manual looking for clues to no avail. I read the
man page for mysql and it doesn't even mention the flag. [3] I try
`mysql -?` but my shell expands the ? and I get an error. mysql --
help finally leads me to the answer when it lists --defaults-extra-
file under the heading, "The following options may be given as the
first argument:". Now my command line looks like this and it works.
mysql --defaults-extra-file=mysql.cnf --user=user ...
This working command is astonishingly similar to the command which
gives an error. I have two nagging questions.
- Why must this flag be first on the command line?
- Why is this not documented in section 4.3.2? [4]
The following requests are addressed to a steward of the MySQL product
if one is listening.
[1] - Please update the man page near the description for --password,
replacing 6.6 with 5.8.6 to correct the section number for "Keeping
Your Password Secure".
[2] - Please add a more descriptive error message indicating that the
--defaults-extra-file flag must be first when displaying the error
message, "mysql: unknown variable 'defaults-extra-file=arg'".
[3] - Please add --defaults-extra-file to the man page.
[4] - Please add the the necessity for --defaults-extra-file to be
first to section 4.3.2 of the manual.
Ken Smith