Title: error while importing dump
Last modified: August 18, 2016

---

# error while importing dump

 *  [gat](https://wordpress.org/support/users/gat/)
 * (@gat)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/error-while-importing-dump/)
 * 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](https://wordpress.org/support/topic/error-while-importing-dump/apache@localhost?output_format=md)
   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..???

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

 *  Anonymous
 * [21 years, 11 months ago](https://wordpress.org/support/topic/error-while-importing-dump/#post-49040)
 * 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?
 *  [carthik](https://wordpress.org/support/users/carthik/)
 * (@carthik)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/error-while-importing-dump/#post-49041)
 * Instructions for phpmyadmin :
    [http://faq.wordpress.net/view.php?p=60](http://faq.wordpress.net/view.php?p=60)
   For command line : [http://wiki.wordpress.org/Database%20Backup](http://wiki.wordpress.org/Database%20Backup)
 *  Anonymous
 * [21 years, 11 months ago](https://wordpress.org/support/topic/error-while-importing-dump/#post-49043)
 * 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'”.
 *  Moderator [Matt Mullenweg](https://wordpress.org/support/users/matt/)
 * (@matt)
 * [21 years, 11 months ago](https://wordpress.org/support/topic/error-while-importing-dump/#post-49046)
 * 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.

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

The topic ‘error while importing dump’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 4 replies
 * 4 participants
 * Last reply from: [Matt Mullenweg](https://wordpress.org/support/users/matt/)
 * Last activity: [21 years, 11 months ago](https://wordpress.org/support/topic/error-while-importing-dump/#post-49046)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
