|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 -- 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 |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On 26 Oct, 00:46, Ken <kgsm...@gmail.com> wrote:
> - Why is this not documented in section 4.3.2? [4] I suspect it then allows one to override any settings in the file with options on the command line (last in gets used). |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Oct 26, 2:28 am, Captain Paralytic <paul_laut...@yahoo.com> wrote:
> On 26 Oct, 00:46, Ken <kgsm...@gmail.com> wrote:> - Why is this not documented in section 4.3.2? [4] > > I suspect it then allows one to override any settings in the file with > options on the command line (last in gets used). I can totally see that but that doesn't make it necessary for this flag to be first. The mysql command line requires it to be first. And, even if it does need to be first, at least tell me that when the command fails to run because the parameter isn't first on the line. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Ken wrote:
> On Oct 26, 2:28 am, Captain Paralytic <paul_laut...@yahoo.com> wrote: >> On 26 Oct, 00:46, Ken <kgsm...@gmail.com> wrote:> - Why is this >> not documented in section 4.3.2? [4] >> >> I suspect it then allows one to override any settings in the file >> with >> options on the command line (last in gets used). > > I can totally see that but that doesn't make it necessary for this > flag to be first. The mysql command line requires it to be first. > And, even if it does need to be first, at least tell me that when the > command fails to run because the parameter isn't first on the line. Well you can always demand your money back. |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Oct 29, 3:06 pm, "Paul Lautman" <paul.laut...@btinternet.com>
wrote: > Ken wrote: > > On Oct 26, 2:28 am, Captain Paralytic <paul_laut...@yahoo.com> wrote: > >> On 26 Oct, 00:46, Ken <kgsm...@gmail.com> wrote:> - Why is this > >> not documented in section 4.3.2? [4] > > >> I suspect it then allows one to override any settings in the file > >> with > >> options on the command line (last in gets used). > > > I can totally see that but that doesn't make it necessary for this > > flag to be first. The mysql command line requires it to be first. > > And, even if it does need to be first, at least tell me that when the > > command fails to run because the parameter isn't first on the line. > > Well you can always demand your money back. Indeed. I'm not asking for here. I'm trying to point out an area where the documentation can be improved and am providing specific data. Your response is not well intended and is not useful. |
|
![]() |
| Outils de la discussion | |
|
|