How to Backup MySQL Database

In this article, we are going to talk about how to backup the MySQL databases. The easiest to backup MySQL database is to use the simple GUI tool SQLBackupAndFTP. It is well known, that the best way to protect your MySQL database from any kind of failure is to create regular MySQL Server backups. Below we will cover the two most popular ways how to backup MySQL databases. The first one is to use a third-party tool like SQLBackupAndFTP and the second is to make  MySQL Server database backups with the help of mysqldump. So let’s start from the first method:

How to Backup MySQL Database With the Help of SQLBackupAndFTP

Below we present five simple steps. Pass them and you will learn how to backup MySQL database automatically using SQLBackupAndFTP.

  1. From the very beginning, you need to download and install SQLBackupAndFTP. Then run the tool and connect it to your MySQL Server. To do it press the “Gear” button at the “Connect to Database Server” section. In the opened window specify the way to connect to MySQL Server either via TCP / IP or phpMyAdmin. Specify your “Hostname”, “Port”, “Username”, and “Password”. Then check the connection by pressing the “Test Connection” button.
  2. Now you need to select all MySQL databases which you need to backup. You can find the list of your MySQL databases by clicking on the “Gear” button at the “Select databases” section.
  3. Now let’s add the destination places where all your MySQL database backups will be stored. To add a destination place simply click at the “plus” at the “Store backups in selected destinations” section and choose the backup destinations from the list.
  4. One of the last steps you need to do is to create a backup schedule. To do it enable the schedule backups option at the “Schedule backups” section to find the advanced settings click on the “Gear” button. In the opened window “Advanced Backup Schedule” create a backup schedule and press the “Save & Close” button.
  5. That is all, your backup schedule is ready and the backups will be performed automatically according to the selected schedule. Press the “Run Now” button to start a backup immediately.
    That was the easiest way how to backup the MySQL database. All settings take about 2 minutes. You can be sure that all backups will be made according to your schedule.

    How to Backup MySQL Database With the Help of mysqldump

    Now let’s discuss the way how to backup the MySQL database using mysqldump. Pass four simple steps and learn how to backup MySQL database.

    1. The first step you need to do is to open a Windows Prompt. You can do it in the following way: press “Start” and enter “cmd” into the dialog box. Press “Enter” to run.
    2. Specify the directory to mysqldump utility – cd C:/Program Files/MySQL/MySQL Server 5.7/bin
    3. Now you need to create a dump of your current MySQL database. Do it in the following way, run the mysqldump.exe with the help of the following arguments:
      mysqldump.exe --user=YourUserName --password=YourPassword --host=localhost --port=3306 --result-file="Pathdump.sql" --databases "DatabaseName"
    4. The program will connect to your current MySQL Server automatically after you made all the necessary settings. A dump of your whole database will be made in the directory you specified in your D:\directory.

That is all. Now you know how to backup MySQL database with the help of SQLBackupAndFTP and mysqldump.

Leave a Reply

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