phpMyAdmin displays error when importing database

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.