• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1017
  • Last Modified:

mysqldump gives syntax error

When I use the mysql dump command, I get an 'error in SQL syntax'.
Even this:
mysql> mysqldump --help;
gives the error

I see that mysqldump is in the bin directory, so it is there.
0
allelopath
Asked:
allelopath
2 Solutions
 
steelseth12Commented:
You dont run mysqldump from within mysql.
You run it from the shell
For more info take a look at http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html
0
 
bayesianmindCommented:
Here's an example usage:

from command line:
mysqldump database -u user -p > backupDB.sql
It will then prompt you for the pass for user and go on its way.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now