Re: mysqldump and special characters in the password [solved]
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 --password=p@$$w0rd 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?
> > 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="p@$$w0rd" and then calling:
mysqldump -u root -p$PASSWORD web8_db1 > wherever.sql