WordPress PhpMyAdmin import db error

Im trying to move my wordpress site over to another hosting. I have exported the db and I am re-importing it onto the hosting. The database does have a different name but I have updated the file.

Here is the error I receive when trying to import it:

Read More

Error

SQL query:

CREATE TABLE IF NOT EXISTS `wp_commentmeta` (
`meta_id` bigint( 20 ) unsigned NOT NULL AUTO_INCREMENT ,
`comment_id` bigint( 20 ) unsigned NOT NULL DEFAULT '0',
`meta_key` varchar( 255 ) DEFAULT NULL ,
`meta_value` longtext,
PRIMARY KEY ( `meta_id` ) ,
KEY `comment_id` ( `comment_id` ) ,
KEY `meta_key` ( `meta_key` )
) TYPE = MYISAM AUTO_INCREMENT =17;

MySQL said: Documentation

#1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘TYPE=MyISAM AUTO_INCREMENT=17’ at line 9

I had a look on here and a lot of people said it was because Add CREATE PROCEDURE / FUNCTION / EVENT statement needed ticking, but I have done this.

Related posts

Leave a Reply

1 comment

  1. As documented under CREATE TABLE Syntax:

    Note
    The older TYPE option was synonymous with ENGINE. TYPE was deprecated in MySQL 4.0 and removed in MySQL 5.5. When upgrading to MySQL 5.5 or later, you must convert existing applications that rely on TYPE to use ENGINE instead.

    Therefore, you want:

    CREATE TABLE IF NOT EXISTS `wp_commentmeta` (
    `meta_id` bigint( 20 ) unsigned NOT NULL AUTO_INCREMENT ,
    `comment_id` bigint( 20 ) unsigned NOT NULL DEFAULT '0',
    `meta_key` varchar( 255 ) DEFAULT NULL ,
    `meta_value` longtext,
    PRIMARY KEY ( `meta_id` ) ,
    KEY `comment_id` ( `comment_id` ) ,
    KEY `meta_key` ( `meta_key` )
    ) ENGINE = MYISAM AUTO_INCREMENT =17;