One of the most important thing in the life of every DBA is regular backups. In this blog post, we are going to discuss how to backup MySQL. There are two common ways, you can backup MySQL Server with the help of third party tool like MySQLBackupFTP or you can make backups using mysqldump. Such simple and easy procedure like scheduled backups will definitely save you time and effort in the future.
How to Backup MySQL With the Help of MySQLBackupFTP
To create a MySQLBackupFTP backup job – pass these simple steps, it will take about 2 minutes, and a backup job will be ready. After you have created a backup job MySQLBackupFTP will make MySQL Server database backups automatically according to your schedule. Let’s start to learn how to backup MySQL.
- From the very beginning, after you have downloaded and installed MySQLBackupFTP you need to connect to MySQL Server. To do it click “Connect to MySQL Server” and choose to connect with the help TCP / IP or phpMyAdmin. Specify your Hostname, Port, Username, and Password. Press “Test MySQL Connection” to check the connection.
- Choose the databases which you are going to backup from the list on the left side.
- Now it is necessary to select a place where your MySQL Server backups will be stored. To do it select “Add backup destination”. In the opened window choose a backup destination place.
- The next step in order to learn how to backup MySQL you need to pass is to create MySQL Server backup schedule. Tick off “Schedule this job” then press “Advanced backup schedule”. In the opened “Advanced Backup Schedule” window make all necessary backup schedule settings and click “Save & Close”.
- That is all, the backups job is ready. Click “Run Now” to start MySQL Server backup immediately. Or press “Save” button to run MySQL Server backups according to your schedule. That’s how to backup MySQL with the help of MySQLBackupFTP.
How to Backup MySQL With the Help of mysqldump
- The first step in order to “how to backup MySQL” you need to do is to open a Windows command line. You can do it with the help of “Start” button. Then enter “cmd” into the dialog box and press “Enter”.
- Enter the pass to mysqldump utility – cd C:Program FilesMySQLMySQL Server 5.7bin
- Create a dump of your current MySQL database. You can do it with the help of mysqldump.exe using the following arguments:
mysqldump.exe --user=YourUserName --password=YourPassword --host=localhost --port=3306 --result-file="Pathdump.sql" --databases "DatabaseName"
- The tool will connect to your current MySQL Server after you have made all necessary settings . A dump of your whole database will be made in the directory you specified in your D: directory.
Please note, that you will not receive a message that will indicate the dump has been completed. The text cursor will simply move to the next line. That is how to backup MySQL using mysqldump.