On 09/01/2006 12:30 PM, Hans du Plooy wrote:
On Thu, 2006-08-31 at 23:34 +0200, Hans du Plooy wrote:
On Thu, 2006-08-31 at 08:06 -0500, Mumia W. wrote:
mysqldump -u root [EMAIL PROTECTED] web8_db1
/home/backup/web8_db1.sql
This fails.  But I can log in with mysql -u root -p   and then type the
password in, and that works.

How do I get mysqldump to deal to deal with the funny characters?
[snip]
Put single quotes around the password.
That's the first thing I tried - I tried escape characters too - no joy.

OK, I don't know why there's a difference, but defining a variable,
PASSWORD="[EMAIL PROTECTED]"  and then calling:

mysqldump -u root -p$PASSWORD web8_db1 > wherever.sql

solved it.

Thanks
Hans



Investigate the contents of the PASSWORD variable. In double-quoted strings, "$$" expands to the current shell's PID. When I defined PASSWORD the way you did, PASSWORD contained this:

[EMAIL PROTECTED]

That's because my shell's PID is 2324. Just be sure you know the actual root mysql password before closing the shell you used to dump the database.




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to