Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error 1064(42000) while trying to execute mysqldump command [duplicate]

im trying to run the following command: mysql> mysqldump --all-databases > dump.sql; on my local(On my pc) Mysql 5.5 server but I keep getting this error:

mysql> mysqldump --all-databases > dump.sql; 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 --all-databases > dump.sql' at line 1. 
like image 929
user2864433 Avatar asked Oct 09 '13 19:10

user2864433


1 Answers

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

mysql> exit $ mysqldump --all-databases > dump.sql 
like image 162
Bill Karwin Avatar answered Sep 20 '22 20:09

Bill Karwin