PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.databases.mysql > MySQLDump
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
MySQLDump

Réponse
 
LinkBack Outils de la discussion
Vieux 09/02/2008, 02h18   #1
avanti
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut MySQLDump

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.


  Réponse avec citation
Vieux 09/02/2008, 04h37   #2
Peter H. Coffin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Shell quoting (was Re: MySQLDump)

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
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 12h13.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,09829 seconds with 10 queries