• andy2016

    (@andy2016)


    Hi, I’m trying to use a backup to restore a WordPress database through phpmyadmin and I’m unable to create a certain table.

    SQL query:

    CREATE TABLE wp_commentmeta (
    meta_id bigint( 20 ) unsigned NOT NULL AUTO_INCREMENT ,
    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,
    PRIMARY KEY ( meta_id ) ,
    KEY comment_id ( comment_id ) ,
    KEY meta_key ( meta_key ( 191 ) )
    ) ENGINE = InnoDB AUTO_INCREMENT=78 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;

    MySQL said: Documentation
    #1005 – Can’t create table ‘gdworld_wp337.wp_commentmeta’ (errno: -1) (Details…)

    MySQL documentation says this error -1 might occur if trying to use internal InnoDB column names.

Viewing 2 replies - 1 through 2 (of 2 total)
  • SJW

    (@whitsey)

    Try removing ENGINE = InnoDB and see what happens

    CREATE TABLE wp_commentmeta (
    meta_id bigint( 20 ) unsigned NOT NULL AUTO_INCREMENT ,
    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,
    PRIMARY KEY ( meta_id ) ,
    KEY comment_id ( comment_id ) ,
    KEY meta_key ( meta_key ( 191 ) )
    ) AUTO_INCREMENT=78 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
    Thread Starter andy2016

    (@andy2016)

    Yep, I did a Find + Replace All InnoDB with MyISAM now the import was successful.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress 4.4.2 Database Restoration MySQL Error 1005’ is closed to new replies.