Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using the following command:

mysqldump -alv -h --password=P@ssw0rd --user=UsernameHere --add-drop-table -p DatabaseSchemaName > dump.sql

Then it asks me to Enter Password. Is there I'm doing wrong when specifying the password in the command?

The password I'm entering is definitely the proper password.

share|improve this question
Look at your statement again. See that -p at the end? That's the password switch. You're overriding your original password switch on the far left because of it. (Because it's blank, it's also asking for a password) – qweet Mar 5 '12 at 17:11
DOH! Didn't see that thing slip in there... Reply with a proper answer and I'll give you credit. Thanks! – Jake Wilson Mar 5 '12 at 17:16

man mysqldump:

--password[=password], -p[password]

The password to use when connecting to the server. If you use the short option form (-p), you cannot have a space between the option and the password. If you omit the password value following the --password or -p option on the command line, you are prompted for one.
Specifying a password on the command line should be considered insecure. See Section 6.6, "Keeping Your Password Secure".

You have two password arguments:

mysqldump -alv -h --password=P@ssw0rd --user=UsernameHere --add-drop-table -p DatabaseSchemaName > dump.sql

Remove that last argument and it should work fine.

share|improve this answer
Yeah qweet pointed that out to me above. Not sure how that slipped in there. Thanks – Jake Wilson Mar 5 '12 at 17:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.