Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Oct 2008 20:00:54 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Andrei Brezan <andrei693@gmail.com>
Cc:        questions@freebsd.org
Subject:   Re: Mysqldump password issue
Message-ID:  <48E51A66.7050507@infracaninophile.co.uk>
In-Reply-To: <48E500EC.9010100@gmail.com>
References:  <48E500EC.9010100@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigC27C910D028914A8431440D3
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

Andrei Brezan wrote:
> Hello list,
>=20
> I wanna do a
> mysqldump -u user -ppasswd --all-databases > backup.sql
>=20
> and all I get is
> mysqldump: No match.
>=20
> 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.
>=20
> 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.
>=20
> If anyone has any ideea please let me know about it.
> I mention that i use Freebsd 7_0 and mysql 5.0.67
>=20

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:@#~+=3D-_^%., 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

--=20
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
                                                  Kent, CT11 9PW


--------------enigC27C910D028914A8431440D3
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREIAAYFAkjlGm0ACgkQ8Mjk52CukIxeZQCfbNly1kruTqDuck61u+qYsf5x
KekAoIu2lyfWgLMWoaMe9Np/Qi7aJaqw
=aqwv
-----END PGP SIGNATURE-----

--------------enigC27C910D028914A8431440D3--



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