How to Backup MySql Database and Restore

Taking Backup & Restore Database in MySQL

Every webmaster need to backup MySQL database regularly and he may also need to restore those database backups in certain cases. Here is a simple tutorial on how to backup MySQL database and restore it in case of need .

Database Backup:

It is extremely simple to backup MySQL database provided phpMyAdmin is up and running. Follow these steps for taking backup:

Step  1.            In phpAdmin open Export menu.

Step  2.            Browse your directory for backup folder.

Step  3.            In left panel all table names are listed, select all here. Below, you can select format of the backup; select SQL here.

Step  4.            In box titled “Structure”, check, checkboxes of “Add AUTO_INCREMENT” and “Enclose table & field name with back quotes” fields.

Step  5.            Under “Structure” box check top check box titled “DATA” and “Use Hexadecimal for BLOB” field.

Step  6.            In same box against “Export type” field select “INSERT”.

Step  7.            You may also compress backup file in either zipped or gzipped formats. By default there is no compression.

Step  8.            Finally check on top of “Save As file” box, backup name will automatically appear in “File name Template” field.

Step  9.            Now backup is just pressing “Go” button away.

Database Restore:

Restoring backup DB is even easier by following these steps.

Step  1.            In MyAdmin menu presee SQL tab.

Step  2.            Uncheck the field named “Show query here”

Step  3.            Reach to the backup directory by browsing.

Step  4.            Press Go button.

It is hoped that the above tutorial on how to backup MySQL database and restore it whenever the need arises .

Leave a Reply