{"id":1093,"date":"2010-04-13T17:45:00","date_gmt":"2010-04-13T09:45:00","guid":{"rendered":"\/?p=1093"},"modified":"2010-04-13T17:45:00","modified_gmt":"2010-04-13T17:45:00","slug":"1093","status":"publish","type":"post","link":"https:\/\/blog.vimge.com\/archives\/mysql\/1093.html","title":{"rendered":"MySQL ERROR "** syntax to use near 'USING BTREE,KEY `Email` (`Email`) USING BTREE""},"content":{"rendered":"

\u62a5\u9519\uff1a<\/strong><\/p>\n

[Err] 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 ‘USING BTREE,
KEY `Email` (`Email`) USING BTREE<\/p>\n

       \u5206\u6790\u95ee\u9898\u5728\u4f7f\u7528\u4e86InnoDB \u7684 BTREE\u4e0a\u9762\uff0c\u67e5\u770b\u4e86\u4e00\u4e0b\u6570\u636e\u5e93 InnoDB\u662f\u9ed8\u8ba4\u6570\u636e\u5e93\u5f15\u64ce\u7c7b\u578b\uff0c\u5e94\u8be5\u95ee\u9898\u4e0d\u662f\u8fd9\u91cc\u9762<\/p>\n

mysql\u5907\u4efd\u8fd8\u539f\u65f6\uff0c\u67e5\u770b\u9519\u8bef\u65e5\u5fd7\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a
Error Code: 1064 C You have an error in your SQL syntax; check themanual that corresponds to your MySQL server version for the rightsyntax to use near \u2018USING BTREE<\/p>\n<\/p>\n

\u5206\u6790\u539f\u56e0\u53ef\u80fd\u4f7f\u7528\u4e86\u9ad8\u7248\u672c\u7684SQL\u8bed\u53e5\u5728\u4f4e\u7248\u672c\u4e2d\u5bfc\u5165\uff0c<\/p>\n

\u6700\u540e\u5728\u7f51\u4e0a\u67e5\u627e\u6574\u7406\u51fa\u4ee5\u4e0b\u51e0\u4e2a\u89e3\u51b3\u65b9\u6cd5\uff1a
1,\u5347\u7ea7MYSQL\u6570\u636e\u5e93\u5230\u76f8\u5e94\u7684\u5bf9\u5e94\u7248\u672c(\u8fd9\u4e2a\u53ef\u80fd\u5f88\u9ebb\u70e6)<\/p>\n

2.\u5bfc\u51fa\u6587\u4ef6\u4e2d\u7684\u6e90\u7801\uff1a
PRIMARY KEY (`row_id`) USING BTREE,
UNIQUE KEY `columnAindex` (`columnA`),
KEY `columnBindex` (`columnB`) USING HASH,
KEY `columnCindex` (`columnC`) USING BTREE,
\u2026
\u5168\u90e8\u66ff\u6362\u4e3a:
PRIMARY KEY USING BTREE  (`row_id`),
UNIQUE KEY `columnAindex` (`columnA`),
KEY `columnBindex` USING HASH (`columnB`),
KEY `columnCindex` USING BTREE (`columnC`),
\u2026
\u5c06\u5bfc\u51fa\u6587\u4ef6\u4e2d\u7684\u6240\u6709\u7d22\u5f15\u7c7b\u578b\uff08USING BTREE \u7b49\uff09\u632a\u5230\u7d22\u5f15\u5217\uff08columnB\u7b49\uff09\u7684\u524d\u9762\uff0c\u95ee\u9898\u89e3\u51b3<\/strong><\/p>\n

3,\u7a0b\u5e8f\u4ee3\u7801ENGINE=MyISAM DEFAULT CHARSET=latin1\u6216\u8005\u7a0b\u5e8f\u4ee3\u7801ENGINE=InnoDBDEFAULTCHARSET=latin1
\u5168\u90e8\u66ff\u6362\u4e3a\u7a0b\u5e8f\u4ee3\u7801
ENGINE=MyISAM
\u53ef\u4ee5\u5c06SQL\u6587\u4ef6\u5206\u6279COPY\u5efa\u7acbSQL\u6587\u4ef6,\u7136\u540e \u5206\u6279\u5bfc\u5165.
\u8fd9\u6837\u65b9\u4fbf\u67e5\u627e\u5177\u4f53\u662f\u90a3\u4e2a\u5730\u65b9\u51fa\u9519,\u5982:
ERROR 1074 at line 1802: Too big column length for column \u2018Cjieshao\u2019(max = 255
. Use BLOB instead
\u8bf4\u660e\u6587\u4ef6\u5b57\u7b26\u957f\u5ea6\u8d85\u8fc7\u5f53\u524d\u7248\u672c. MYSQL4.0\u53ea\u652f\u6301255\u4e2a,\u5f53\u9ad8\u7248\u672c\u5982MYSQL5.0\u5bfc\u5165\u65f6\u5019\u5c31\u8981\u6ce8\u610f\u4fee\u6539\u957f\u5ea6\u4e3a255\u518d\u5bfc\u5165\u5c31\u4f1a\u6b63\u5e38
ERROR 1064 at line 3034: You have an error in your SQL syntax.   Checkthe manua
that corresponds to your MySQL server version for the right syntax touse near
\u2018collate utf8_swedish_ci default NULL,
PRIMARY KEY   (`sshyid`)
\u89e3\u51b3\u65b9\u6cd5: \u53bb\u6389 \u2018collate utf8_swedish_ci \u5c31\u6b63\u5e38
.sql -u root -p\u5bc6\u7801<\/p>\n","protected":false},"excerpt":{"rendered":"

\u62a5\u9519\uff1a<\/strong><\/p>\n

[Err] 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 ‘USING BTREE,
KEY `Email` (`Email`) USING BTREE<\/p>\n

       \u5206\u6790\u95ee\u9898\u5728\u4f7f\u7528\u4e86InnoDB \u7684 BTREE\u4e0a\u9762\uff0c\u67e5\u770b\u4e86\u4e00\u4e0b\u6570\u636e\u5e93 InnoDB\u662f\u9ed8\u8ba4\u6570\u636e\u5e93\u5f15\u64ce\u7c7b\u578b\uff0c\u5e94\u8be5\u95ee\u9898\u4e0d\u662f\u8fd9\u91cc\u9762<\/p>\n

mysql\u5907\u4efd\u8fd8\u539f\u65f6\uff0c\u67e5\u770b\u9519\u8bef\u65e5\u5fd7\uff0c\u5185\u5bb9\u5982\u4e0b\uff1a
Error Code: 1064 C You have an error in your SQL syntax; check<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/posts\/1093"}],"collection":[{"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/comments?post=1093"}],"version-history":[{"count":0,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/posts\/1093\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/media?parent=1093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/categories?post=1093"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.vimge.com\/wp-json\/wp\/v2\/tags?post=1093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}