WordPress.org

Ready to get started?Download WordPress

Forums

Receiving MySQL error #1064 when importing database (7 posts)

  1. Anders Norén
    Member
    Posted 4 years ago #

    I have been running a WordPress blog locally for a few days, using XAMPP. I decided to upload it yesterday, but ran into some problems when importing the database in phpMyAdmin. I receive the following error:

    CREATE TABLE IF NOT EXISTSwp_comments` (
    comment_ID bigint( 20 ) unsigned NOT NULL AUTO_INCREMENT ,
    comment_post_ID bigint( 20 ) unsigned NOT NULL DEFAULT '0',
    comment_author tinytext NOT NULL ,
    comment_author_email varchar( 100 ) NOT NULL DEFAULT '',
    comment_author_url varchar( 200 ) NOT NULL DEFAULT '',
    comment_author_IP varchar( 100 ) NOT NULL DEFAULT '',
    comment_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
    comment_date_gmt datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
    comment_content text NOT NULL ,
    comment_karma int( 11 ) NOT NULL DEFAULT '0',
    comment_approved varchar( 20 ) NOT NULL DEFAULT '1',
    comment_agent varchar( 255 ) NOT NULL DEFAULT '',
    comment_type varchar( 20 ) NOT NULL DEFAULT '',
    comment_parent bigint( 20 ) unsigned NOT NULL DEFAULT '0',
    user_id bigint( 20 ) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY ( comment_ID ) ,
    KEY comment_approved ( comment_approved ) ,
    KEY comment_post_ID ( comment_post_ID ) ,
    KEY comment_approved_date_gmt ( comment_approved , comment_date_gmt ) ,
    KEY comment_date_gmt ( comment_date_gmt )
    ) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =11;

    MySQL sa: Dokumentation
    #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 '--------------------------------------------------------

    --
    -- Struktur för ta' at line 1

    I'm pretty sure that I am messing up something fundamental; I just can't figure out what.

  2. whooami
    Member
    Posted 4 years ago #

    CREATE TABLE IF NOT EXISTSwp_comments` ( ... <--- you need a space unless thats a typo.

    CREATE TABLE IF NOT EXISTS wp_comments

  3. Anders Norén
    Member
    Posted 4 years ago #

    It's a typo, unfortunately.

  4. whooami
    Member
    Posted 4 years ago #

    ok, so whats the content.. whats in the first line of what you are insering .. thats after that table inser in the .sql file?

    looks like non-english chars or something?

  5. Anders Norén
    Member
    Posted 4 years ago #

    It is, but the settings (both for import and export) are on utf-8, so that shouldn't be a problem.

  6. Mike
    Member
    Posted 4 years ago #

    any answer to this? having the same problem

  7. There are a variety of solutions depending on your specific situation:

    http://wordpress.org/search/MySQL+error+1064

Topic Closed

This topic has been closed to new replies.

About this Topic