Backup a MySQL Database Through SSH

From the archive. Written in 2012 and kept for the record, so some of it has dated.

1. Connect through SSH
2. Navigate to an accessible folder through FTP (eg “cd /var/www/vhosts/[sitename])
3. Run the command “mysqldump –host localhost –user [username] –password [databasename] > [filename].sql
4. Enter password when prompted
5. View file in FTP viewer in folder and download