How to Import a MySQL Database using phpMyAdmin
Written by Brad MarkleIn 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.
- Log into cPanel
- 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.
- Open phpMyAdmin by clicking the "phpMyAdmin" icon
- Select the database in the left menu that you will be working with
- Click "Import" in the top menu
- 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).
- Click "Go" at the bottom right
- 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!
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?
Tweet
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)
Recent QuestionsNeed 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 |


