Importing databases isn’t always the simplest thing to do because sometimes the databases get a mind of their own, and can make importing the database into your web hosting account tricky. This is especially true when you start encountering errors within your web hosting account and are unsure of what to do. Below, we’ve created an outline of how to fix one of the most common database import errors.
"ACCESS DENIED CREATE DATABASE db_name".
cPanel Suggested Resolution:
The above error message means that there is an import error; when there is an import error, you are no longer able to import the database into your web hosting account until the error is resolved. Please see below on how this can be done:
- Open your .sql file with a text editor (such as notepad)
- Upon opening the file look for a line called "CREATE DATABASE yourdbname"
- Once you’ve located that name, simply delete that line and save the file.
- After this, simply retry the import using PHPMyAdmin.
- Also, be sure that you have assigned users the appropriate privileges and permissions to access all of these new and old databases.
The aforementioned solution should resolve the problem that you received. If not, please feel free to reach out to your web hosting support team and they will be glad to assist you further.