How to restore your MySQL database from a backup using phpMyAdmin

phpMyAdmin is a program used to manipulate databases remotely through a web interface. At the basic level, it allows you to fully manage the database tables (create, edit, delete (delete)) and the data contained in them (select, update, delete rows). it also allows you to create and restore database backups. In this tutorial, we will only cover the process to restore a MySQL database.

The following instructions will replace your current database with the backup and revert your to the state it was in when you made the backup.

What do you need?

Before continuing with the tutorial make sure you have the following:

  • Access to the control panel of your hosting provider.
  • Database backup file.

Step 1 – Login to phpMyAdmin

phpMyAdmin is usually located in the Database section of the control panel:

Step 2 – Select the database you want to restore

When you have entered phpMyAdmin you will see a list with the MySQL Databases that you have created, select the base that you are about to restore.

Within the selected database you will see a navigation tree on the left side; select the database you want to import a backup to. You will either see a list of tables within the database or a screen that says no tables exist. This will depend on your configuration:

Step 3 – Choose the SQL file to import

You will now need to upload the backup file to phpMyAdmin. To do so, follow these steps:

  1. Near the top of the page you will see several tabs. Select the tab that says to import (import).
  2. On the next page you will find a button that says Choose File (choose file) or Review (browse), select it.
  3. In the window that will appear to browse files from your computer, find and select the database backup file and select the button Open. You should see the file name appear next to the Choose File button.
  4. Make sure the SQL is selected in the Format drop-down menu.
  5. Select the Go button:

Step 4 – Verify that the restore was successful

The import process will take a few moments to take effect. Eventually you should see a message telling you that the import has been successful:

If you get an error message instead, you can always contact your hosting provider for further assistance.

conclusion

Having finished this tutorial, you should have successfully restored your database from a backup file using phpMyAdmin. With this knowledge, you should be able to successfully restore any MySQL database, so don’t forget to make backups from time to time.

Gustavo is passionate about creating websites. He focuses on the application of SEO strategies at for Spain and Latin America, as well as the creation of high-level content. When he is not applying new WordPress tricks you can find him playing the guitar, traveling or taking an online course.

See also  Types of e-commerce with examples
Loading Facebook Comments ...
Loading Disqus Comments ...