The following command run from SSH will backup and gzip all mySQL databaes and place them inot the /home directory:
mysqldump --add-drop-table --all-databases | gzip > /home/alldatabases.sql.gz
To restore all the databases if needed later, run the following command assuming the original gzip file is in the orriginal location:
gunzip < /home/alldatabases.sql.gz | mysql -u root