Forums

[resolved] mysql import error (4 posts)

  1. janemaraid
    Member
    Posted 5 years ago #

    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.

  2. drmike
    Member
    Posted 5 years ago #

    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.

  3. janemaraid
    Member
    Posted 5 years ago #

    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.

  4. janemaraid
    Member
    Posted 5 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags