0

I'm migrating a WordPress for a friend to a different server. I have already backed up all files and was given a copy of the database by the old server admin. The problem is that when I try and import the database using phpMyAdmin, I get this error message:

SQL query: -- -- Database: ``wordpress_6`` -- CREATE DATABASE ``wordpress_6`` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; MySQL said: Documentation #1044 - Access denied for user 'prvtres9'@'localhost' to database 'wordpress_6

I'm not sure what would initiate this error message, but the tiny amount of information I found out in several hours of frustration eludes that it could be in the way the database was copied, therefore putting me in a helpless position, but I don't want to approach the old server admin just to be wrong about this

  • Try creating a database first and then importing, it's a permissions issue. – Andrew Bartel May 14 '14 at 21:46
  • What do you mean? The database was created first, I don't understand how I could import it if it wasn't created first – little tiny man May 14 '14 at 22:06
1

If you have already created the database that you wish to import into and you have selected that database in PHPMyAdmin, but the import file is trying to create a new database, then you will see this error message.

All you need to do is open up the SQL file in a text editor and delete the line that begins with CREATE DATABASE (it will be very near the top of the file).

Now try the import again and it should import that data into your selected database rather than trying to create a new one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.