In this tutorial, we will show you how to import a MySQL Database using phpMyAdmin. We'll assume that you've already exported your database, and it is either a .sql, zip, or tar.gz file. If you haven't read our previous article on how to export a database, please see How to Export a Database using phpMyAdmin.

  1. Log into cPanel
  2. To import a database, you'll first need to create the blank database. If you haven't already created the database, click the "MySQL Database Wizard" icon and follow the guide to create a database.
  3. Open phpMyAdmin by clicking the "phpMyAdmin" icon
  4. Select the database in the left menu that you will be working with
  5. Click "Import" in the top menu
  6. 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).
  7. Click "Go" at the bottom right
  8. 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!

how-to-use-phpmyadmin-to-import-a-database

Important! If you get the following error when importing a a database through PhpMyAdmin, you will need to edit the sql file.
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. If you have any trouble please contact tech support.
Like this Article?

Login to comment.

Your Opinion Matters

... but we need to know what you're thinking!

I'm Brad Markle, your friendly Community Support technician, and I wrote the article you're looking at now. I like to think it's perfect, but I'm sure you have some suggestions. Please, let me know what they are!

Feedback
Your Email Address
Because we'd like to talk with you!

Latest Questions

If you need some help, submit your question to our Community!
We guarantee a response within 60 minutes (8am - 9pm EST, Monday - Friday)
Ask a Question!
Recent Questions
  1. Can I create a website on another website (e.g. Wix) and have it hosted on my inmotion domain?
  2. Why can't I see my updated web files on my website?
  3. Adding Google Analytics

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!