WordPress.org

Ready to get started?Download WordPress

Forums

Importing DB error:CREATE TABLE IF NOT EXISTS `wp_commentmeta (3 posts)

  1. blyster
    Member
    Posted 1 year ago #

    When I'm trying to import databes on host server in, Cpanel phpMyadmin, I' getting sql database error:

    -- Table structure for table wp_commentmeta
    --
    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 = InnoDB DEFAULT CHARSET = utf8 AUTO_INCREMENT =1;

    MySQL said: Documentation
    #1046 - No database selected

    I mention that import databes I m trying to import is not the same name as dbase I created in Cpanel, and when I access my site in wordpress on server there is not any more my theme, pictures, text, pages, only defalut twentyeleven theme!

    Where did I mistake?

  2. blyster
    Member
    Posted 1 year ago #

    Actually I've got a new error message, now I tried to import dbase in existing dbase on server what is right way.

    SQL query:
    -- Dumping data for table wp_comments
    --
    INSERT INTO wp_comments ( comment_ID , comment_post_ID , comment_author , comment_author_email , comment_author_url , comment_author_IP , comment_date , comment_date_gmt , comment_content , comment_karma , comment_approved , comment_agent , comment_type , comment_parent , user_id )
    VALUES ( 1, 1, 'Mr WordPress', '', 'http://wordpress.org/', '', '2012-06-05 19:51:20', '2012-06-05 19:51:20', 'Hi, this is a comment.
    To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.', 0, 'post-trashed', '', '', 0, 0 ) ;

    MySQL said: Documentation
    #1062 - Duplicate entry '1' for key 'PRIMARY'

  3. blyster
    Member
    Posted 1 year ago #

    Solved, I have emptied tables in phpMyadmin than import db

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.