How to backup MySQL on Linux
Connect to your Linux server via SSH
-
Use the mysqldump utility to create your database backup. The command is run in the format “mysqldump –host server_name –user username –password db_name > backup_file_name.mysql”
- Host: the hostname or IP Address of the MySQL server that hosts your database
- User: your MySQL user name
- Password: your MySQL password. You will be prompted to enter this when the command is executed.
- DB Name: the name of your MySQL database
- Backup File Name: this is the file that will contain the backup of your database.
- When prompted enter your database password.
- Your database is now being backed up to the specified file.
- Additional options can be found by running “mysqldump –help” .