Wednesday, May 20, 2009

MySQL Dump

I was trying to figure out how to use 'mysqldump', and there are a few KEY points that people leave out when trying to explain how to use it.

1.    DON'T be in mysql command line client when trying to use this command.  It seems common sense, but until you know, you don't.
2.   When trying to give the password -p option, make sure there is NO space between the -p and your password. (e.g mysqldump -u [name] -p[password] --all-databases > alldb.sql)
Notice how there is NO space between the 'p' and 'password'.  There was only one example that used this that I found.  Every other example showed a space.  It may work on MySQL 5.1+, but it does not work on my copy of MySQL 5.0.

No comments:

Post a Comment