• Hi there,

    I’m trying to switch some of my sites to new databases that utilise PHP5 so I can (finally) upgrade to WordPress 3.2

    I’ll explain one example to you, they’re basically all the same.

    I exported the contents of my old database and created a new one. In myPHPadmin no matter what I do I get the following error when importing:

    ***

    Error
    SQL query:

    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

    ***

    I’ve done quite a bit of research online and I’ve followed all the guidelines.

    I’ve removed the lines that specify the old database (didnt work).

    Then I removed the text at the top that specifies what it is e.g — phpMyAdmin SQL Dump, — version 2.11.10, — https://www.phpmyadmin.net etc, (didnt work).

    Finally I removed some code at the top of the sql that was suggested to me to get rid of in a different forum. Code beginning with this:SET SQL_MODE=”NO_AUTO_VALUE_ON_ZERO”; (also didnt work)

    I’ve tried uploading the sql file in myPHPadmin and pasting the code into the SQL tab of the import function.
    No matter what I keep on getting the above error.

    If someone can help me I’d really appreciate it.

    Thanks in advance
    Ciaran

Viewing 2 replies - 1 through 2 (of 2 total)
  • did you edited your sql file before uploading to the new one ?????

    Thread Starter ciarangaffey

    (@ciarangaffey)

    Yes I did.

    First I imported it with no edits. Then I removed the lines that specify the old database. Then I removed the text at the top that specifies what it is e.g — phpMyAdmin SQL Dump. Finally I removed some code at the top of the sql that began with this:SET SQL_MODE=”NO_AUTO_VALUE_ON_ZERO”;

    After every step I got the same error message.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Importing Sql file to new database via myPHPadmin’ is closed to new replies.