You have an error in your SQL syntax; check the manual that corresponds to your MySQL

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了You have an error in your SQL syntax; check the manual that corresponds to your MySQL相关的知识,希望对你有一定的参考价值。

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 ) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=gbk' at line 13
CREATE TABLE `dede_payment` ( `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, `code` varchar(20) NOT NULL DEFAULT '', `name` varchar(120) NOT NULL DEFAULT '', `fee` varchar(10) NOT NULL DEFAULT '0', `description` text NOT NULL, `rank` tinyint(3) unsigned NOT NULL DEFAULT '0', `config` text NOT NULL, `enabled` tinyint(1) unsigned NOT NULL DEFAULT '0', `cod` tinyint(1) unsigned NOT NULL DEFAULT '0', `online` tinyint(1) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `code` (`code`) USING BTREE ) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=gbk

MySQL 4与5的不同版本之间在建表的一些修饰符选项有不同。如 USING BTREE及ENGINE=MyISAM
可参考相同版本的手册进行修改,或忽略这些选项就可以了
参考技术A 去除 USING BTREE 就ok了

Error:You have an error in your SQL syntax; TYPE=MYISAM

技术分享

操作前先备份脚本文件:

找到sql脚本并执行(这里以aaa.sql为例)

 sed -i ‘s/type=MyISAM/ENGINE=MyISAM/g‘ aaa.sql  ###aaa.sql为sql语句的存储文件

本文出自 “净空蓝星” 博客,请务必保留此出处http://jingkonglanxing.blog.51cto.com/1152128/1743758

以上是关于You have an error in your SQL syntax; check the manual that corresponds to your MySQL的主要内容,如果未能解决你的问题,请参考以下文章

1064 - You have an error in your SQL syntax;

Mysql错误 ERROR 1064 (42000): You have an error in your SQL syntax

Error:You have an error in your SQL syntax; TYPE=MYISAM

1064 - You have an error in your SQL syntax问题解决

Mysql排错:[Err] 1064 - You have an error in your SQL syntax;

MySQL错误[ERR] 1064 - You have an error in your SQL syntax;