Naveen.S Naveen.S - 1 year ago 46
SQL Question

Error in Mysqldump command

I have a data base named "mig". it has 10 tables. now i want to create a same database in another system so I am using

command but it shows error.

I entered command as follows :

mysqldump -u root -p root mig >file.sql;

This is the error i got :

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 'mysql
dump -u root -p root mig >file.sql' at line 1

I am getting the same error when I use ,

mysqldump -u root -proot mig >file.sql;

How can i fix this ?


Simply try-

mysqldump -u root mig> file.sql


mysqldump is not a MySQL command, it is a command line utility. You must call it from your shell command line. I hope you are not calling this from MySQL prompt.