Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Oct 2008 23:16:12 +0300
From:      Andrei Brezan <andrei693@gmail.com>
To:        questions@freebsd.org
Subject:   Re: Mysqldump password issue
Message-ID:  <48E52C0C.8030300@gmail.com>
In-Reply-To: <48E51A66.7050507@infracaninophile.co.uk>
References:  <48E500EC.9010100@gmail.com> <48E51A66.7050507@infracaninophile.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matthew Seaman wrote:
> Andrei Brezan wrote:
>> Hello list,
>>
>> I wanna do a
>> mysqldump -u user -ppasswd --all-databases > backup.sql
>>
>> and all I get is
>> mysqldump: No match.
>>
>> This happens either i put --all-databases or I specify any of the
>> databases. I want to do a backup as user root, that's why I use
>> all-databases opt.
>>
>> If I use the command:
>> mysqldump -u root -p --all-databases >backup.sql
>> I get the password prompt, I type the passwd and everythig works great.
>> It seems that there is a problem with -p, i've tried --password with
>> same result.
>>
>> If anyone has any ideea please let me know about it.
>> I mention that i use Freebsd 7_0 and mysql 5.0.67
>>
> 
> My guess is that the password (which you've obviously elided) contains
> characters of syntactic significance to the shell.  Any of the following
> will lead to wailing and gnashing of teeth:
> 
>  * ? [ < > & ; ! | $
> 
> Probably others as well.  The general way to get round this is to
> put 'quote' marks around your password -- but this will only work if
> the password is a separate word on the command line -- ie. whitespace
> between it and any other tokens.  I believe that the '-p' flag to MySQL
> is a bit painful in that regard as it doesn't allow whitespace between
> itself and the password.  Hmmm... untested, but it should work if you
> just quote around the -p like so: '-ppassword'.
> 
> Alternatively, just change the password to one containing less
> troublesome characters: a-zA-Z0-9:@#~+=-_^%., I recommend use of
> 'apg' to generate randomised but strangely memorable passwords.  Oh,
> and simply making the password longer makes it much more secure even
> if you're limited to a relatively small alphabet.
> 
>     Cheers,
> 
>     Matthew
> 

Thank you Matthew, you were right. My password contains special
characters. It works now with '-ppasswd' or with --password='passwd'


- --
Andrei Brezan
310280 Arad - Romania
mobile <+40 740 089 315>
email <andrei@bsoft-company.ro>
www <http://www.bsoft-company.ro/>;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjlLAwACgkQUmw8msqk48YKugCfasoH9/cfo/xgss7wmuAIlnK6
xS8An0idODUSkUnwKLlRKYKqoCQ5Cy3P
=UQ5J
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?48E52C0C.8030300>