WordPress.org

Ready to get started?Download WordPress

Forums

error while importing dump (5 posts)

  1. gat
    Member
    Posted 10 years ago #

    i just upgraded to the latest nightly build (wordpress-2004-05-03.tar.gz), after running the upgrade script everithing was ok!
    now, i need to move the upgraded database from a server to another, so i made a dump using:
    mysqldump --user=MYDBUSER --pass=MYDBPASS MYDBASENAME > dump.sql
    my mysql version is 3.23.58, my new host uses 4.0.18-standard-log + PhpMyAdmin, so i needed to upload my dump into the SQL section so that he reads it as a sql query (isn't it?). i first bzip2ed it (phpmyadmin supports it..) and then uploaded it..
    when tried to upload it the first time i got the following error:
    query SQL :
    --
    ------------------------------------------------------- --
    --
    --
    CREATE TABLE b2categories(
    cat_ID int( 4 ) NOT NULL AUTO_INCREMENT ,
    cat_name tinytext NOT NULL ,
    category_nicename varchar( 200 ) NOT NULL default '',
    category_description text NOT NULL ,
    category_parent int( 4 ) NOT NULL default '0',
    KEY cat_ID( cat_ID ) ,
    KEY category_nicename( category_nicename ) ,
    KEY category_nicename_2( category_nicename )
    ) TYPE = MYISAM
    Messaggio di MySQL:
    #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '---------------------------------------------------------
    --
    --
    what the.. ! ok, i'm not a mysql geek actually.. but, what's wrong with this query?
    then i tried again with another dump (using --add-drop-table):
    mysqldump --user=MYDBUSER --pass=MYDBPASS --add-drop-table MYDBASENAME > dump.sql
    now, nice start again, i got a sort of crash which forced me to logout/login, saying that apache@localhost was a jackass :)
    the very next time i tried (with add drop table) i got this:
    query SQL :
    --
    ------------------------------------------------------- --
    --
    --
    DROP TABLE IF EXISTS b2categories
    Messaggio di MySQL:
    #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '---------------------------------------------------------
    --
    --
    it seems that there's something wrong in this '---------' thing..???

  2. Anonymous
    Unregistered
    Posted 10 years ago #

    I have the exact problem and I can't figure it out. I have mySQL 3.20 and my host where I'm trying to upload a backup is running 4.0.18 and phpmyadmin.
    Did you ever resolve it?

  3. carthik
    Member
    Posted 10 years ago #

  4. Anonymous
    Unregistered
    Posted 10 years ago #

    The error is probably in how you export your old database. I don't know a direct solution, but I fixed this by installing phpMyAdmin and using their export feature (be sure to check the box "Add 'drop table'".

  5. Matt Mullenweg
    Troublemaker
    Posted 10 years ago #

    Yeah those hypen lines are not valid SQL, and that would mess things up. If you export from the command line, you should import on the command line. If you export from phpMyAdmin, you should import from phpMyAdmin.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.