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

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


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

mysql> exit$ mysqldump --all-databases > dump.sql


You must execute that command from the system shell, don't forget to use username and password to access all databases, example:

mysqldump -u root -p --all-databases > dump.sql