From owner-freebsd-questions@FreeBSD.ORG Thu Oct 2 20:34:18 2008 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF13910656B8 for ; Thu, 2 Oct 2008 20:34:18 +0000 (UTC) (envelope-from fcondo@quinn.com) Received: from sushi.quinn.com (sushi.quinn.com [216.27.181.95]) by mx1.freebsd.org (Postfix) with ESMTP id 6578B8FC15 for ; Thu, 2 Oct 2008 20:34:18 +0000 (UTC) (envelope-from fcondo@quinn.com) Received: from [192.168.1.100] (cpe-76-170-216-193.socal.res.rr.com [76.170.216.193]) (authenticated bits=0) by sushi.quinn.com (8.14.2/8.14.2) with ESMTP id m92KDiVx088603 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Thu, 2 Oct 2008 13:13:44 -0700 (PDT) (envelope-from fcondo@quinn.com) Message-Id: <55808659-9401-4D7A-8565-D7851D8E1F0B@quinn.com> From: Fred Condo To: Andrei Brezan In-Reply-To: <48E51A66.7050507@infracaninophile.co.uk> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Thu, 2 Oct 2008 13:13:43 -0700 References: <48E500EC.9010100@gmail.com> <48E51A66.7050507@infracaninophile.co.uk> X-Mailer: Apple Mail (2.929.2) Cc: questions@freebsd.org Subject: Re: Mysqldump password issue X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2008 20:34:18 -0000 On Oct 2, 2008, at 12:00 PM, 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. If consistent with your security policies, you can store the password in your ~/.my.cnf file: [client] user=db_user password=funny&password