Home
/
PHP & MySQL Tutorial
/
MySQL Backup Restore Tutorial

MySQL Backup Restore Tutorial

This tutorial explains how to back up the information from your MySQL databases and restore it when needed.

MySQL Export: How to backup your MySQL database?

To create a dump file of a database used by your account you can use the phpMyAdmin available in your Site Tools > Site > MySQL > phpMyAdmin:

Once the tool page loads, select the database in question from the panel on the left side.

A new page will be loaded showing the structure of the selected database. To create a backup of the database, click on Export.

On the page that opens you can choose from using the Quick or Custom export methods. The Quick method is usually the preferred choice, but if you would like to customize the export process and output you can use the Custom one. Once you choose the appropriate method, select the desired format of the backup from the Format: drop-down and click on Go.

A download window will pop up prompting for the exact place where you would like to save the file on your local computer. It is possible that the download starts automatically. This depends on your browser’s settings.

MySQL Import: How to restore your MySQL database from a backup

To restore a database via phpMyAdmin, first, choose the database you’ll be importing data into. This can be done from the menu on the left.

A new page will be loaded showing the structure of the selected database. To import data inside the database, click on Import.

On the new page that opens, click on Choose file and select the backup that you want to import from your local computer. You have the option to pick the character set of the file from the drop-down menu just below the upload box. If you are not certain about the character set your database is using just leave the default one. Once ready, click on Go to perform the import.

The import will start and once finished you will be redirected to a page with a confirmation notification that the import was successful.

Share This Article