Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a 2.2gb SQL dump that I need to import. I'm using the following:

mysql -u myuser -p mydb < backup-20-june.sql

Which i've used many times in the past. However this is what's happening, surely these are escaped by the dump etc?

ERROR 1064 (42000) at line 196: 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 ''A New York Review Books OriginalDeceptionâthe lies we tell ourselves and the ' at line 1

Is there a flag i'm missing, or do you have any ideas? - Thanks

share|improve this question
It's time to upgrade MySQL... – alexus Jun 21 '13 at 12:39
From looking at it closer it's going from: 5.5.30-30.2 to 5.5.31-30.3 - So it's actually going to a newer version? – Tom Beech Jun 21 '13 at 12:47
What options did you use when creating the dump (I'm particularly thinking about --skip-extended-insert but others could be important) and what is the max_allowed_packet on both the source and destination servers? – Ladadadada Jun 21 '13 at 12:49
To be frank, I just did a mysqldump -u mysql_user -p DATABASE_NAME > backup.sql – Tom Beech Jun 21 '13 at 12:51
show us the whole line of the dump, which causes the error. – Fox Jun 21 '13 at 13:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.