This article will show you how to import your MySQL database.
You should get this message: Import has been successfully finished, X queries executed.
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.
Note: Users on a VPS or Dedicated server can import larger file by increasing the cPanel PHP max upload size and the cPanel PHP max POST size from WHM, under Tweak Settings.
The problem here is your import file contains an SQL query that attempts to create a database for the wrong username. Notice the user2 in 'user2_wrdp9' does not match the username1 in 'username1'@'localhost'. Its necessary to edit the import file and change the old user2 to your new username1. Here is an example of what it looks like (notice 3 places where the username is outdated):
Database: `user2_wrdp9`CREATE DATABASE `user2_wrdp9` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;USE `user2_wrdp9`;
This error is displayed when your import file does not have a query to create the database before importing the data. Simply go to cPanel >MySQL Databases and create a database with that name (in the example of our article, "wrdp9"). Then re-attempt your import.
The issue means that your import file contains an SQL query that attempts to create a database that already exists. If the database is empty, just go to cPanel >MySQL Databases and remove that empty database; then re-attempt your import. If the database is not empty, you should edit the import file and remove the CREATE DATABASE query. Here is an example of what it looks like:
CREATE DATABASE `username1_wrdp9` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;