#1064 – You have an error in your SQL syntax
When exporting and importing from and to different MySQL databases with diferent version numbers this error message might show up:
#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 ‘ENGINE=MyISAM DEFAULT CHARSET=utf8′
I got the message when exporting from a MySQL 5.x database and importing to a MySQL 4.x database. The solution came to me from the following blog post comment and is very easy. Just add the --compatible option:
mysqldump -u username -ppassword –compatible=mysql40 database_name > FILENAME.sql