sridhar s
sridhar s

Reputation: 149

Export mysql Error 1064 <42000>: You have an error in your sql syntax

I have seen many replies to this question, but none of the solutions worked for me, so i am repeating the same question. I am using mysql 5.5.30 on windows xp. I am able to open mysql command line by giving this command:
d:\mysql\usr\local\mysql\bin>mysql –uroot –proot

But when i use the same username and password to export a database by giving this command:
mysql>mysqldump -uroot -proot svga3 > dbsqlfile.sql
I GET THIS ERR:

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 -uroot -proot svga3 > dbsqlfile.sql

AFTER seeing many on responses and tried all combinations of the same line, it does't work, need help!

Other option tried:

 mysqldump -u root -p root svga3 > dbsqlfile.sql
 mysqldump -uroot -p svga3 > dbsqlfile.sql
 mysqldump -u root -p=root svga3 > dbsqlfile.sql
 mysqldump -u -p svga3 > dbsqlfile.sql

Upvotes: 1

Views: 7359

Answers (1)

Mina
Mina

Reputation: 1516

You can't run mysqldump from a mysql shell, it needs to run from the prompt.

d:\mysql\usr\local\mysql\bin>mysqldump ...

Upvotes: 3

Related Questions