In this tutorial:

In this tutorial, we will show you how to import a MySQL Database using phpMyAdmin.

Prerequisites

We'll assume that you've already exported your database, and it is either a .sql, zip, or tar.gz file. You should have already created the new database that you're importing into as well.

How to:

  1. how-to-use-phpmyadmin-to-import-a-database Log into cPanel
  2. Open phpMyAdmin by clicking the phpMyAdmin icon
  3. Select the database in the left menu that you will be working with
  4. Click Import in the top menu
  5. Under File to Import, click Browse and select the backup file you previously created (it will be either a .sql .zip or .tar.gz file).
  6. Click Go at the bottom right
  7. When the database has been imported successfully, you should see a message at the top of the page similar to: Import has been successfully finished, ## queries executed.

    Congratulations, you have just imported a database!

Troubleshooting

#1044 - Access denied

If you get the following error when importing a a database through PhpMyAdmin, you will need to edit the sql file you're trying to import.

CREATE SCHEMA IF NOT EXISTS `DataBaseName` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

MySQL said: Documentation
#1044 - Access denied for user 'userna5'@'localhost' to database 'DatabaseName'

PhpMyAdmin does not allow you to CREATE databases due to security reasons. In order to get your SQL file to load you will need to remove the CREATE SCHEMA line at the beginning of your code, this tutorial here can help

50+ MB databases

If the database that you are trying to import is over 50 MB in size, then you will not be able to import the database through phpMyAdmin on shared servers.

VPS and Dedicated Servers

Only VPS/Dedicated server accounts with root access can import a database larger than 50 MB using the command line access. For more details on the actual command, go to mysqlimport - a data import program.

Shared servers

For users on shared hosting, you can follow these steps to import a database larger than 50MB.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

News / Announcements

WordPress wp-login.php brute force attack
Updated 2014-07-17 06:43 pm EST
Hits: 201633

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!