How to Restore Your MySQL Database From a Backup Using phpMyAdmin

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 database tables(create, edit, drop (delete)) and data contained in them (select, update, delete rows). phpMyAdmin also allows you to create and restore database backups. In this tutorial, we will cover database restoration process only.

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

What you’ll need

Before you begin this guide you’ll need the following:

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

Step 1 — Entering phpMyAdmin

phpMyAdmin is usually located in the Databases section on the control panel.

Click phpMyAdmin icon the Databases section to enter phpMyAdmin.

Step 2 — Selecting the database for restoration

In the left navigation tree click the database you want to import the backup into. You will then see either a list of tables already inside that database or a screen that says no tables exist. This depends on your setup.

Choose a database and click it in the left navigation menu.

Step 3 — Choosing SQL file for import

We now have to fetch our database backup file to phpMyAdmin. To do this, perform these actions:

  1. Across the top of the screen will be a row of tabs. Click the Import tab.
  2. On the next screen will be a button named Choose File or Browse, click it.
  3. In the dialog, locate the database backup file stored on your computer and click Open. You should see your chosen file name shown next to the Choose File button.
  4. Make sure SQL is selected in the Format drop-down menu.
  5. Click the Go button.

5 step procedure for import

Step 4 — Verifying the successful restoration

The import procedure may take quite a while. Eventually, you should see a success screen similar to the following one:

Success message in green background.

If you get an error message instead, you can always ask your hosting provider’s support for assistance.

Conclusion

Having finished this tutorial you should have already 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 occasionally.

Author
THE AUTHOR

Edvinas B.

Edvinas is a professional mentor and trainer of customer support agents. When he's not teaching new guys the secrets of providing an exceptional service, he likes to travel the world and play basketball.