Title: Importing MySQL database
Last modified: August 18, 2016

---

# Importing MySQL database

 *  [dailyjapan](https://wordpress.org/support/users/dailyjapan/)
 * (@dailyjapan)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/importing-mysql-database/)
 * Hi,
 * I switched hosts and am now trying to move my wordpress blog over to the new 
   host. When I try to import the .sql file with mysqladmin I get an error message
   saying:
 * Database d60155072 running on MySQL Server Farm 2 Error SQL-query :
    CREATE DATABASE`
   d60155072` MySQL said: Can’t create database ‘d60155072’. Database exists
 * Is there something that I need to change in the .sql so that it doesnt try to
   create the d60155072 database, but instead just import the tables and data?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/importing-mysql-database/#post-193867)
 * Open the sql dumpfile in a text editor and look for the CREATE line near the 
   top:
 * `CREATE DATABASE d60155072;`
 * Just comment it out.
 * `-- CREATE DATABASE d60155072;`
 * Note that if it does not end in a semi-colon, check to make sure the query is
   not continued on multiple lines.
 *  Thread Starter [dailyjapan](https://wordpress.org/support/users/dailyjapan/)
 * (@dailyjapan)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/importing-mysql-database/#post-193868)
 * I think it looks like that already… here is what I have:
 * PHP Version: 4.3.11
    — — Database: `d60155072` — CREATE DATABASE `d60155072`;
   USE d60155072;
 * — ——————————————————–
 * —
    — Table structure [continued]
 * That didnt paste very well, but when you look at the .sql in notepad, it has 
   a — before create database. Do I need to add an extra — before that?
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/importing-mysql-database/#post-193870)
 * `PHP Version: 4.3.11
    -- -- Database: d60155072 -- CREATE DATABASE d60155072;
   <—– Comment me! USE d60155072;
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/importing-mysql-database/#post-193871)
 * `PHP Version: 4.3.11
    -- -- Database: d60155072 -- -- CREATE DATABASE d60155072;
   <—–Ah, thanks! USE d60155072;
 *  Thread Starter [dailyjapan](https://wordpress.org/support/users/dailyjapan/)
 * (@dailyjapan)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/importing-mysql-database/#post-193888)
 * Yeah that worked. Turns out there was also an invisible character in between 
   the — and word create that I had to get rid of.
 * Everything works just fine now. Thanks!
 *  [Adrian](https://wordpress.org/support/users/affiliates/)
 * (@affiliates)
 * [20 years, 6 months ago](https://wordpress.org/support/topic/importing-mysql-database/#post-194291)
 * Thanks for this post. I’ve just moved host and was struggling with import to 
   a new database. Commenting out the ‘CREATE’ part did it for me.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Importing MySQL database’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [Adrian](https://wordpress.org/support/users/affiliates/)
 * Last activity: [20 years, 6 months ago](https://wordpress.org/support/topic/importing-mysql-database/#post-194291)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
