How to restore your database from cPanel

The day may come when you need to restore a database. If you have already backed up your database then this will be a fairly simple process.

If, however, you haven’t backed up your databases and need to restore one (or more) then your hosting company can probably do this for but they will likely charge a fee. Read my instructions on how to do this at http://www.nichestorestrategies.com/how-to-backup-your-sites-database/ and save your hard-earned money by doing it yourself.

I use HostGator so the images and instructions below are for this host. If you host with a different company then your steps may differ.

 

My instructions to restore your database from cPanel:

Step One
 Log in to your hosting account’s cPanel.
  
 Click on the ‘Backups‘ icon or link:
Image of HostGator's Backups link
  
 Look for the ‘Restore a MySQL Database‘:
Image of HostGator's Restore Database
  
 Click the ‘Browse‘ button to locate the file for the database you want to restore and then click the ‘Upload‘ button.
Step Two
 You will now see something that looks similar to this image:
Image of HostGator's Database that's being restored
  
 Press your browser’s back button to return to the previous screen.
  
 Chances are that is all you need to do. View your site and see if it looks correct or if there are errors. If all looks the way it should then you are done. But if you see errors then you may need to do a little more work.
Step Three
  Go to cPanel’s Home page and click on the ‘MySQL® Databases‘ link or icon:
Image of HostGator's Databases link
  
 Scroll down until you find the database you just restored. When you find it look to see if there is a user associated with the database. If there is you will see the following information directly under the database:
Image of wording you should see under a database
  
 Here is an image of a database that doesn’t have a user associated with it and one that does directly under it:
Image of a database with no user
  
 The database in the picture above called neeznood_testdatabase does not have any users. If this was the database I just restored then my niche store would not function and I would see errors on the site.
  
 Scroll further down on the screen and create a user and password for the restored database.
  
 Save the new user and click the ‘Go Back‘ link.
  
 Scroll down to the bottom and add the user to the database. Click the ‘Add User To Database‘ button then click the ‘Go Back‘ link.
  
 Scroll down to find your restored database. Hopefully it now has a user associated with it. Here is an image of my database with a user added to it:
Image of a database with a user
.

Hopefully that will be all your database needs to resume working. If it doesn’t then I am the wrong person to turn to. The above is the extent of my knowledge on this. I would suggest contacting your hosting company for additional help.

Rochelle

5 Responses to “How to restore your database from cPanel”

  1. [...] If there are errors you can restore your database (you did back it up before starting this, right?) by reading my instructions here. [...]

  2. [...] Restore your databases using the steps found here. [...]

  3. [...] back to the cPanel for your new URL. Follow the instructions found at How to Restore Your Database From cPanel. As stated in step three, it is important that the database you restore has the same name as the [...]

  4. Mindlinker says:

    What if the database is already on the server?

    How can I restore it when I don’t have it to upload?

    There should be a feature in cpanel where I can point to where the database is stored on the server and it should restore it from that location faster than I could upload it from my pc.

    My issue is that the database is too large to download and then upload again.

  5. Rochelle says:

    @Mindlinker

    In a case such as yours, I recommend contacting your hosting tech support to see if they can help you out. Most of the time, they can.

    Rochelle

Leave a Reply