How to dump/backup a database using SSH?

If you have SSH enabled, you can export a database to your hosting account, using the command listed below, where you replace ‘name’, ‘username’, ‘host’ and ‘password’ with your specific database details:
mysqldump DB_NAME -uDB_NAME -hMYSQL_HOST -pPASSWORD > /home/www/path-to/file.sql