WordPress.org

Ready to get started?Download WordPress

Forums

Restoring from backup - phpMyAdmin error (3 posts)

  1. stannum_ph
    Member
    Posted 6 years ago #

    Hi, tried to restore my database through phpMyAdmin, but i'm getting the following error:

    Error

    SQL query:

    --
    -- Database: stannum_wrdp1
    --
    -- --------------------------------------------------------
    --
    -- Table structure for table wp_comments
    --
    CREATE TABLE wp_comments (
    comment_ID bigint( 20 ) unsigned NOT NULL AUTO_INCREMENT ,
    comment_post_ID int( 11 ) 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 enum( '0', '1', 'spam' ) NOT NULL default '1',
    comment_agent varchar( 255 ) NOT NULL default '',
    comment_type varchar( 20 ) NOT NULL default '',
    comment_parent bigint( 20 ) NOT NULL default '0',
    user_id bigint( 20 ) NOT NULL default '0',
    PRIMARY KEY ( comment_ID ) ,
    KEY comment_approved ( comment_approved ) ,
    KEY comment_post_ID ( comment_post_ID )
    ) ENGINE = MYISAM DEFAULT CHARSET = latin1 AUTO_INCREMENT =1501;

    MySQL said: Documentation
    #1050 - Table 'wp_comments' already exists

    What should I do to fix this?

  2. Keilya
    Member
    Posted 6 years ago #

    If you are indeed restoring from back ups, meaning you have all your comments in the current file you're trying to restore, simply drop the wp_comments table that is in the database currently and try again.

    Because your query is asking SQL to "CREATE TABLE wp_comments (" but it cannot do so while a table with the same name already exists.

  3. stannum_ph
    Member
    Posted 6 years ago #

    Already solved the problem by dropping all existing tables in the database and restoring from the backup.

    Thanks for the tip fantasycrusader.

Topic Closed

This topic has been closed to new replies.

About this Topic