The Official Blog of Short Hills Design

mysqldump error 1064 — Solved – How to use the mysqldump command (video)

As I was trying to backup my mysql database with the following command:

mysql> mysqldump -uuser -ppass databaseDB > output.sql

(where user is the username, pass is the password, and databaseDB is the database name)

I continued to receive the following error:

ERROR 1064(42000):  You have an error in your SQL syntax; check the manual  that corresponds to your MySQL server version for the right syntax to use near ‘mysqldump’ at line 1.

After some searching I realized that my syntax was correct, but I was putting the command in the wrong place!

The mysqldump command needs to run from the command prompt (for windows), NOT in the mysql console!

That’s it.  Problem solved!

Here is a video that will walk you through basic usage of the mysqldump command:

One Comment

vijaya  on June 4th, 2010

Hi thankyou very much, saved my day.

Leave a Comment