• I had to transfer my domain to a new server,

    I backed up my database using Phpmyadmin,

    When i try to restore it using these steps
    http://codex.wordpress.org/Restoring_Your_Database_From_Backup

    I get the following error

    Error
    
    SQL query:
    
    --
    -- Database: <code>davidsco_wp679</code>
    --
    -- --------------------------------------------------------
    --
    -- Table structure for table <code>wp_commentmeta</code>
    --
    CREATE TABLE <code>wp_commentmeta</code> (
    <code>meta_id</code> bigint( 20 ) unsigned NOT NULL AUTO_INCREMENT ,
    <code>comment_id</code> bigint( 20 ) unsigned NOT NULL DEFAULT '0',
    <code>meta_key</code> varchar( 255 ) DEFAULT NULL ,
    <code>meta_value</code> longtext,
    PRIMARY KEY ( <code>meta_id</code> ) ,
    KEY <code>comment_id</code> ( <code>comment_id</code> ) ,
    KEY <code>meta_key</code> ( <code>meta_key</code> )
    ) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =44;
    
    MySQL said: Documentation
    #1050 - Table 'wp_commentmeta' already exists
Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    #1050 – Table ‘wp_commentmeta’ already exists

    On the database that you are restoring to, if there is nothing there you want to keep then drop your existing tables. That will let the backup restore.

    If there is already data there that you want to keep, then don’t drop those tables…

    Thread Starter davidstokes

    (@davidstokes)

    I’ve a fresh install of wordpress on the server,, I dont need anything on the new isntall. But i need everything on the backup I have.

    So what do i delete. ? and how ? I’ve never used phpmyadmin before

    thank you.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    I’m a mysql CLI sort of person myself but give this a read. It may help you drop the right tables.

    http://tamba2.org.uk/wordpress/empty-drop/

    Thread Starter davidstokes

    (@davidstokes)

    I import the database, it says it works ,

    when i try access the admin control panel i get this message
    One or more database tables are unavailable. The database may need to be repaired.

    I add it and run it .. comes back ok the following

    The wp_users table is okay.
    
    The wp_usermeta table is okay.
    
    The wp_posts table is okay.
    
    The wp_comments table is okay.
    
    The wp_links table is okay.
    
    The wp_options table is okay.
    
    The wp_postmeta table is okay.
    
    The wp_terms table is okay.
    
    The wp_term_taxonomy table is okay.
    
    The wp_term_relationships table is okay.
    
    The wp_commentmeta table is okay.
    
    Repairs complete. Please remove the following line from wp-config.php to prevent this page from being used by unauthorized users.

    Says all ok, But doesn’t work.. still says
    One or more database tables are unavailable. The database may need to be repaired.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Did you add something to the wp-config.php file like it says here?

    http://codex.wordpress.org/Editing_wp-config.php#Automatic_Database_Optimizing

    If so, remove the additional lines (make a backup copy of wp-config.php first).

    Thread Starter davidstokes

    (@davidstokes)

    yes i did.. but I also removed it when it said remove it.

    Thread Starter davidstokes

    (@davidstokes)

    When I import the database and it says it works my site says

    Error establishing a database connection

    I can’t access the admin panel it says what i posted above

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    That’s bizarre. That usually means your database settings are either wrong or your database went away.

    If you made a backup copy of that wp-config.php file, try putting it back and see if you can connect.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘restoring a backup getting errors’ is closed to new replies.