• Resolved ninja-master-jimmy-wong-fu

    (@ninja-master-jimmy-wong-fu)


    Hi everyone.

    I am attempting to transfer my live site to my localhost for testing and have taken the following steps:

    1) Uploaded the theme, plugins, and upload folders to my pc via Dreamweaver – maintaining the folder structure.

    2) I have exported the live .sql database and saved as a text file.

    3) I have changed the http://www.mysite.co.uk occurrences with http://localhost/mysite, so that hte paths to all documents are correct

    However, when I go to import the sql file into phpmyadmin I get the following error:

    Error
    
    SQL query:
    
    -- phpMyAdmin SQL Dump
    -- version 2.8.2
    -- http://www.phpmyadmin.net
    --
    -- Host: localhost
    -- Generation Time: Nov 23, 2010 at 09:16 PM
    -- Server version: 4.1.20
    -- PHP Version: 5.2.8
    --
    -- Database: <code>oliverbee</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 =1;
    
    MySQL said: Documentation
    #1046 - No database selected

    I believe I may have made a simple error somewhere.

    Please let me know if you have encountered this or if you know of a solution to this problem.

    Thanks all

    O

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter ninja-master-jimmy-wong-fu

    (@ninja-master-jimmy-wong-fu)

    OK, I have taken the following steps:

    1) Created a blank database in phpmyadmin

    2) Imported my database

    Everything seems fine but when I try to access wp-login.php I get an unstyled login screen that, when filled in, says object not found.

    wp-install.php says the site has already been installed and that I need to clear old database tables first.

    ??

    Thread Starter ninja-master-jimmy-wong-fu

    (@ninja-master-jimmy-wong-fu)

    Part 3:

    1) I have dropped the tables so I have a blank database

    2) I have installed wordpress and selected my theme

    3) I then try to import the backup database adn I get the following error

    Error
    
    SQL query:
    
    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 =1;
    
    MySQL said: Documentation
    #1050 - Table 'wp_commentmeta' already exists

    I have installed wordpress
    […]
    Table ‘wp_commentmeta’ already exists

    WP creates the tables during the install process. So you either need to import just the content for the various table. Or empty the database again, do not run the install process and import the entire sql dump into the database.

    Have you reviewed Moving_WordPress?

    Thread Starter ninja-master-jimmy-wong-fu

    (@ninja-master-jimmy-wong-fu)

    1)exported database from live WordPress through built in feature in tools section
    2)performed a fresh install of WordPress on localhost
    3)ftpd content essential files from live server: uploads, plugins and theme from live to localhost
    4)activated localhost WordPress
    5)imported database to localhost through phpmyadmin and assigned db name
    6)set database details on wp-gonfig.php
    7)logged in to localhost, set home page, adn checked for posts
    8)search and replaced all themefiles so path names were correct
    9)search and replace the database through phpmyadmin so path names are correct

    VICTORY!

    i have the same problem. when I go to import the sql file into phpmyadmin I get the following error:

    Error
    SQL query:


    — Database: ososantoso

    — ——————————————————–

    — Table structure for table wp_commentmeta

    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 ) DEFAULT NULL ,
    meta_value LONGTEXT,
    PRIMARY KEY ( meta_id ) ,
    KEY comment_id ( comment_id ) ,
    KEY meta_key ( meta_key )
    ) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =1;

    MySQL said:

    #1046 – No database selected

    help me please.. what should i do?

    in the “Format of imported file” uncheck “Do not use AUTO_INCREMENT for zero values” Its work with me..

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Error when importing sql database to phpmyadmin’ is closed to new replies.