How to backup MySQL on Linux

How to backup MySQL on Linux

Connect to your Linux server via SSH

  1. 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.
  2. When prompted enter your database password.
  3. Your database is now being backed up to the specified file.
  4. Additional options can be found by running “mysqldump –help” .

Your email address will not be published. Required fields are marked *