问题描述:通过source+sql文件路径导入数据库报错
错误提示:ERROR 1064 (42000): 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 'USING BTREE
分析原因:mysql版本较低从而无法识别USING BTREE关键字,
命令:select version();查询自己的版本是: 5.0.22-community-nt
而mysql 5.14版本之前不认识USING BTREE,才出此报错
解决方法:把USING BTREE放到索引字段前面即可,或者直接删掉也行。
形如:
KEY parent_id
(parent_id
,status
) USING BTREE,
改成
KEY parent_id
USING BTREE (parent_id
,status
) ,
再导入就OK了!
参考:https://segmentfault.com/a/1190000008904360
http://skyhome.cn/sql/504.html