1

I want to take dump of databse. I am using below command but getting error

mysqldump -u root -p schemaname >  schemaname_dump.sql

Error is

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
learner_me
  • 91
  • 1
  • 10

1 Answers1

1

mysqldump is a command you invoke at the shell prompt, not within the mysql client environment.

mysql> exit
$ mysqldump --all-databases > dump.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.

Do not open a mysql client environment open command prompt directly type your dump command it will surely work i did it myself.

Amitesh Kumar
  • 3,051
  • 1
  • 26
  • 42