Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am getting the following error when attempting to restore a MySQL data dump to a different server and a different MySQL version ...

ERROR 1064 (42000) at line 14165: 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 'm telling everyone.&lt' at line 1

Source of dump file ...

  • linux server
  • MySQL v 5.1.22
  • mysqldump -u UserName -p DBname | gzip > DUMPname.sql.gz

Destination ...

  • linux server
  • MySQL v 5.1.35
  • cat DUMPname.sql.gz | gunzip | mysql -u UserName -p DBname

This dump will restore fine on the origin server.

It's large (25 gig) which makes it hard for me to research the dump file.

Any suggestions ???

Thanks Jeff

share|improve this question
    
25M isn't a large dump file. 25GB is a large dump file. –  David Pashley Aug 24 '09 at 16:37
    
I meant to say it's 25 gig –  JeffG Aug 24 '09 at 16:47
    
what's line 14165? –  Jure1873 Jan 18 '11 at 2:01
    
It's the line indicated in error message. I assumed it referred to the dump file –  JeffG Jan 18 '11 at 2:01
    
Because the file is so big, I'm having trouble isolating it. –  JeffG Jan 18 '11 at 2:01

3 Answers 3

Looks like an unescaped apostrophe error to me. Just find it, fix it, then go on to the next one and hope there aren't too many.

share|improve this answer

you might try --skip-opt --complete-insert which will put one insert statement per line in the dump file. You should then be able to find and delete the offending line with grep and sed.

share|improve this answer

It could possibly be fixed by adjusting one or both of the following two mysqldump options. Use the same option values for export and import.

  1. FIELDS ENCLOSED BY ( default = ' - which appears to be the problem )
  2. FIELDS ESCAPED BY ( default = \ )

MySQL mysqldump docs

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.