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 a command you invoke at the shell prompt, not within the mysql client environment.
mysql> exit
$ mysqldump --all-databases > dump.sql