Title: SQL Syntax error
Last modified: August 31, 2016

---

# SQL Syntax error

 *  [mnasimul](https://wordpress.org/support/users/mnasimul/)
 * (@mnasimul)
 * [10 years ago](https://wordpress.org/support/topic/sql-syntax-error-12/)
 * When I import database.sql, I get the following error. I checked the entire internet
   with NO straightforward solution. Please do not answer assuming me an expert.
   Please answer in detail. Thank you
 * Error
    SQL query:
 * CREATE TABLE `wp_commentmeta` (
    `meta_id` bigint(20) UNSIGNED NOT NULL, `comment_id`
   bigint(20) UNSIGNED NOT NULL DEFAULT ‘0’, `meta_key` varchar(255) COLLATE utf8mb4_unicode_ci
   DEFAULT NULL, `meta_value` longtext COLLATE utf8mb4_unicode_ci ) ENGINE=InnoDB
   DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci MySQL said: Documentation
 * #1050 – Table ‘wp_commentmeta’ already exists

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

 *  [mairajan](https://wordpress.org/support/users/mairajan/)
 * (@mairajan)
 * [10 years ago](https://wordpress.org/support/topic/sql-syntax-error-12/#post-7360591)
 * Error message suggests that your database already have contents in it, thus overwriting
   the existing table. Are you using a newly created database?
 *  [mairajan](https://wordpress.org/support/users/mairajan/)
 * (@mairajan)
 * [10 years ago](https://wordpress.org/support/topic/sql-syntax-error-12/#post-7360592)
 *  Thread Starter [mnasimul](https://wordpress.org/support/users/mnasimul/)
 * (@mnasimul)
 * [10 years ago](https://wordpress.org/support/topic/sql-syntax-error-12/#post-7360597)
 * This is new database. I exported to desktop and replaced localhost to my domain.
   When attempted to import, it gives error.
 * I checked without changing anything. Just exported and attempted to import with
   no change. It still gives the same message. I tried with command CREATE TABLE
   IF NOT EXISTS. That did not help either. or DROP TABLE IF EXISTS.
 * I am quite surprise, experts have NO straightforward answer. I spent golden 6
   hours in ytube and google.

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

The topic ‘SQL Syntax error’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [mnasimul](https://wordpress.org/support/users/mnasimul/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/sql-syntax-error-12/#post-7360597)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
