#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version……的解决方案

在导入sql脚本到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 ‘TYPE=MyISAM AUTO_INCREMENT=4’ at line 15 

随即查找原因,发现原来的sql脚本是几年前用mysql 2.5.0-rc2版本创建的,而当前的mysql版本是5.5.24。问题可能就出在这里了,实际上,从mysql 5.5开始,TYPE=MYISAM这样的类型的命令已失效,使用ENGINE替换了TYPE。因此将sql脚本中的“TYPE=”批量替换成“ENGINE=”即可。