• Resolved janemaraid

    (@janemaraid)


    Hi there

    I have exported a mysql database from my local server and I am trying to import it to my remote server using php admin. After I try to import it I get this error

    #1064 – You have an error in your SQL syntax.

    it points me to the last line of this piece of code

    CREATE TABLE wp_categories (
    cat_ID bigint(20) NOT NULL auto_increment,
    cat_name varchar(55) NOT NULL default ”,
    category_nicename varchar(200) NOT NULL default ”,
    category_description longtext NOT NULL,
    category_parent bigint(20) NOT NULL default ‘0’,
    category_count bigint(20) NOT NULL default ‘0’,
    PRIMARY KEY (cat_ID),
    KEY category_nicename (category_nicename)
    ) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;

    I realise I can open it in a code editor but I have no idea what I am looking at and why it is wrong.

    Any help would be greatly appreciated.

Viewing 3 replies - 1 through 3 (of 3 total)
  • What versions of MySQL are you running at home and on your new server? I’m looking at the charset statement since that was a change in IIRC 4.1. I run into it on occasion.

    Thread Starter janemaraid

    (@janemaraid)

    Hi drmike

    I am running version 5.0.27 at home and 4.1.13 on the new server. I entered ‘none’ in the SQL export compatibility box during export.

    Thread Starter janemaraid

    (@janemaraid)

    I got my SQL database imported through a suggestion from a friend. changed the code to

    CREATE TABLE wp_categories (
    cat_ID bigint(20) NOT NULL auto_increment,
    cat_name varchar(55) NOT NULL default ”,
    category_nicename varchar(200) NOT NULL default ”,
    category_description longtext NOT NULL,
    category_parent bigint(20) NOT NULL default ‘0’,
    category_count bigint(20) NOT NULL default ‘0’,
    PRIMARY KEY (cat_ID),
    KEY category_nicename (category_nicename)
    ) AUTO_INCREMENT=6 ;

    I did this for all the tables.

    I still don’t have my blog up and running (due to other issues completely) and I don’t know what changes I made to the content – if any. But it did import.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘mysql import error’ is closed to new replies.