Solved

mysqldump gives syntax error

Posted on 2007-11-14
2
1,000 Views
Last Modified: 2012-08-13
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
Comment
Question by:allelopath
2 Comments
 
LVL 20

Accepted Solution

by:
steelseth12 earned 400 total points
ID: 20282387
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
 
LVL 3

Assisted Solution

by:bayesianmind
bayesianmind earned 100 total points
ID: 20282394
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now