Feb 04, 2019
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.
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.
Step 3 — Choosing SQL file for import
We now have to fetch our database backup file to phpMyAdmin. To do this, perform these actions:
- Across the top of the screen will be a row of tabs. Click the Import tab.
- On the next screen will be a button named Choose File or Browse, click it.
- 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.
- Make sure SQL is selected in the Format drop-down menu.
- Click the Go button.
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:
If you get an error message instead, you can always ask your hosting provider’s support for assistance.
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.