How to save a MySQL Database and Restore the Backup with phpMyAdmin

This article was modified on 2011-06-30 15:20:18

I had no ideea that is so important to create a backup of my mysql database until two days ago. When you realize that you`re not a newbie in the world of computers and Internet, you finally realize that a backup is the best thing to do for you when your HDD will crash or an error occurs. Unfortunately for us, any mysql database can be lost and we really don`t want this to happen. If you want to know how to save a mysql database, you`re in the right place and it`s also really easy. Let`s get started. First thing to do is to log in with your username and password in your Control Panel, like in this picture :

cPanel Login Interface


Obviously, now we need to find the phpMyAdmin interface which is right under the ``Databases`` feature.


phpMyAdmin Feature located in cPanel - Control Panel


If you successfully accessed phpMyAdmin, click on ``Export`` tab, it`s the fifth tab from left to right, select the proper mysql database if you have more than one ( I have only one ). As you can see it allows you to select everything or only a couple of them. Unless you really know what you`re doing I would strongly recommend to leave all the options as they are. Hit the ``Go`` button and you will be able to save a copy ( create a backup ) of your mysql database on your computer.

Export feature from phpMyAdmin


Don`t forget about the ``Go`` button, look down the page on the right side, I have made a screenshot with this button.

Go button from phpMyAdmin interface

 

Now, if you want to upload your mysql database backup all you have to do is to repeat all the steps and I mean to login to your control panel, access phpMyAdmin and from there you need to access the ``Import`` feature, it`s right near ``Export``.  From there, all you have to do is to choose the right file to import. Find your saved copy by clicking on the ``Choose File`` button and navigate on your computer straight to your mysql database backup. Select it and again, hit the ``Go`` button. That`s it, that`s how you can restore a backup of your mysql database.

 Import option from phpMyAdmin interface, in order to restore a previous backup choose Import and then click on the Choose File button and select the copy of your MySQL Database

Again, don`t forget about the  ``Go`` button, I am not going to post the same picture again.

I don`t know if it`s right to say that you need to create a backup and then to restore that backup when actually the options from phpMyAdmin are being named export and import. This is how you can save a mysql database and restore the backup later when you need it.

Leave a comment