MySQL

How to Restore Your MySQL Database From a Backup Using phpMyAdmin

Introduction

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.

3 Comments

Click here to post a comment

  • I Have deleted my MYSQL database from my hostinger account unexpectedly.The problem is i dont have the backup of that database..but i have the database name and path of the database.can you please help me.It’s very urgent for me.please help me as soon as you have seen this message.
    The database name is u612761251_ynazy
    and the database path is /home/u612761251/public_html
    Actually the thing is Mywordpress data is linked to that database.i want it back..please help me.
    website name is hindustancbcs.tk

  • I try to import a base from Go-Daddy.
    Problem: Username.
    As I understand, you can not create a database with the same username as GoDaddy, and because of that, I get error messages.
    What can be done in this situation?

    • Hey,

      Yes, you will not be able to create a database with the same name. However, you can edit your PHP scripts and use new db and username there.

Join thousands of subscribers worldwide

and get awesome deals & the newest tutorials to your email

Please wait...

Thank you for sign up!