There are many ways to back up a MySQL database, but one of the easiest and most reliable is to use SSH. This process can be completed on a Linux or Mac machine, and doesn’t require any additional software.
To back up a MySQL database using SSH, you will first need to create a backup script. This script can be as simple or complex as you like, but will need to include the following commands:
mysqldump -u USERNAME -p DATABASE_NAME …