Forums

mysqldump error in sql syntax

Noob question but I'm getting error in my sql syntax when running mysqldump and I really can't figure out why.

my command:

mysqldump -u username -p password -h mysql.server --databases    'username$db' > home/user/main/dump.sql;

What error do you get? Where are you running it from?

Running it in database console. ERROR 1064 (42000): You an error in your SQL syntax;

That's the problem, then. mysqldump isn't a MySQL command (despite it's name). It's a bash command-line tool, so you need to run it from a bash prompt.

oh snap! Thanks man.

NP, glad to help!