|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
I have a website hosted on Godaddy that has a MySQL DB. I added a cron job to run daily to backup the DB. The command looks like: mysqldump --host=p50mysql25.secureserver.net --user=username -- password='password' dbname > "$HOME/html/backups/dailybackup.sql" My password has special characters and I am entering it in single quotes escaping the special chars with a \. I see an error: mysqldump: Got error: 1045: Access denied for user: 'usern...@p3slh030.shr.phx3.secureserver.net' (Using password: YES) when trying to connect Any idea how to get this working? Thanks. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Fri, 8 Feb 2008 18:18:19 -0800 (PST), avanti wrote:
> Hi, > > I have a website hosted on Godaddy that has a MySQL DB. I added a > cron > job to run daily to backup the DB. The command looks like: > > > mysqldump --host=p50mysql25.secureserver.net --user=username -- > password='password' dbname > "$HOME/html/backups/dailybackup.sql" > > > My password has special characters and I am entering it in single > quotes escaping the special chars with a \. I see an error: > > mysqldump: Got error: 1045: Access denied for user: > 'usern...@p3slh030.shr.phx3.secureserver.net' (Using password: YES) > when trying to connect > > Any idea how to get this working? Single quotes (like ') are much stronger than double quotes like ", and will even strip the specialness of \. $ echo '\' \ $ echo '\$' \$ $ echo '\$PS' \$PS $ echo '$PS' $PS So, don't put \ in your single-quoted password. (Unless, of course, your password HAS \ in it, in which case use only the right number.) -- 64. I will see a competent psychiatrist and get cured of all extremely unusual phobias and bizarre compulsive habits which could prove to be a disadvantage. --Peter Anspach's list of things to do as an Evil Overlord |
|
![]() |
| Outils de la discussion | |
|
|