PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.databases.mysql > --defaults-extra-file
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
--defaults-extra-file

Réponse
 
LinkBack Outils de la discussion
Vieux 26/10/2007, 00h46   #1
Ken
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut --defaults-extra-file

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

  Réponse avec citation
Vieux 26/10/2007, 10h28   #2
Captain Paralytic
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: --defaults-extra-file

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).

  Réponse avec citation
Vieux 29/10/2007, 22h12   #3
Ken
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: --defaults-extra-file

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.

  Réponse avec citation
Vieux 29/10/2007, 23h06   #4
Paul Lautman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: --defaults-extra-file

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.


  Réponse avec citation
Vieux 30/10/2007, 09h09   #5
Ken
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: --defaults-extra-file

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.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 15h05.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13809 seconds with 13 queries