{"id":131,"date":"2017-09-06T14:11:13","date_gmt":"2017-09-06T06:11:13","guid":{"rendered":"http:\/\/www.jdde.cn\/?p=131"},"modified":"2017-09-06T14:35:12","modified_gmt":"2017-09-06T06:35:12","slug":"mysql%e5%b8%b8%e8%a7%81%e9%94%99%e8%af%af%e7%a0%81%e7%9a%84%e8%ae%b2%e8%a7%a3","status":"publish","type":"post","link":"http:\/\/www.jdde.cn\/?p=131","title":{"rendered":"MySQL\u5e38\u89c1\u9519\u8bef\u7801\u7684\u8bb2\u89e3"},"content":{"rendered":"<p><a href=\"http:\/\/www.jdde.cn\/wp-content\/uploads\/2017\/09\/wKiom1muTTDwnBNHAADH7sK8etk037.jpg-wh_651x-s_4200483620.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-132\" src=\"http:\/\/www.jdde.cn\/wp-content\/uploads\/2017\/09\/wKiom1muTTDwnBNHAADH7sK8etk037.jpg-wh_651x-s_4200483620.jpg\" alt=\"\" width=\"651\" height=\"366\" srcset=\"http:\/\/www.jdde.cn\/wp-content\/uploads\/2017\/09\/wKiom1muTTDwnBNHAADH7sK8etk037.jpg-wh_651x-s_4200483620.jpg 651w, http:\/\/www.jdde.cn\/wp-content\/uploads\/2017\/09\/wKiom1muTTDwnBNHAADH7sK8etk037.jpg-wh_651x-s_4200483620-300x169.jpg 300w\" sizes=\"(max-width: 651px) 100vw, 651px\" \/><\/a><\/p>\n<p><strong>Error code 1064: Syntax error<\/strong><\/p>\n<p>\u5047\u8bbe\u6709\u4e00\u4e2asql\u8bed\u53e5<\/p>\n<ol class=\"dp-sql\">\n<li class=\"alt\"><span class=\"keyword\">select<\/span>\u00a0LastName,\u00a0FirstName,<span class=\"keyword\">from<\/span>\u00a0Person<\/li>\n<\/ol>\n<p>\u6267\u884c\u7684\u65f6\u5019\u4f1a\u5305\u9519\u8bef<\/p>\n<ol class=\"dp-sql\">\n<li class=\"alt\">Error\u00a0Code:\u00a01064.\u00a0You\u00a0have\u00a0an\u00a0error\u00a0<span class=\"op\">in<\/span>\u00a0your\u00a0SQL\u00a0syntax;\u00a0<span class=\"keyword\">check<\/span>\u00a0the\u00a0manual\u00a0that\u00a0corresponds\u00a0<span class=\"keyword\">to<\/span>\u00a0your\u00a0MySQL\u00a0server\u00a0version\u00a0<span class=\"keyword\">for<\/span>\u00a0the\u00a0<span class=\"func\">right<\/span>\u00a0syntax\u00a0<span class=\"keyword\">to<\/span>\u00a0use\u00a0near\u00a0<span class=\"string\">&#8216;from\u00a0Person&#8217;<\/span>\u00a0<span class=\"keyword\">at<\/span>\u00a0line\u00a02.<\/li>\n<\/ol>\n<ul>\n<li>1064\u9519\u8bef\u8bf4\u660e\u4f60\u7684sql\u8bed\u53e5\u6709\u8bed\u6cd5\u9519\u8bef\uff0c\u5355\u770b\u8fd9\u4e2a\u9519\u8bef\u7801\uff0c\u6211\u4eec\u65e0\u6cd5\u5224\u65ad\u51fa\u5177\u4f53\u662f\u54ea\u7684\u9519\u8bef\u3002<\/li>\n<li>\u4ed4\u7ec6\u770b\u62a5\u9519\u4fe1\u606f\u7684\u6700\u540e\uff0c\u6709\u4e00\u6bb5\u7528\u5355\u5f15\u53f7\u6807\u8bc6\u7684\u5bf9\u6e90sql\u8bed\u53e5\u7684\u5f15\u7528&#8217;from Person&#8217;\uff0c\u8fd9\u8868\u793a\u7684\u662f\u8fd9\u6bb5sql\u8bed\u53e5\u65e0\u6cd5\u88ab\u89e3\u6790\uff0c\u4f46\u662f\u5bf9\u4e8e\u6211\u4eec\u8fd9\u4e2a\u4f8b\u5b50\uff0c\u8fd9\u4e2a\u62a5\u9519\u5f15\u7528\u5e76\u6ca1\u4ec0\u4e48\u5375\u7528\u3002\u6211\u4eec\u518d\u6ce8\u610f\u89c2\u5bdf\uff0c\u8fd9\u4e2a\u5f15\u7528\u7684\u4fe1\u606f\u524d\u9762\u591a\u4e86\u4e00\u4e2a\u9017\u53f7\uff0c\u8fd9\u4e2a\u9017\u53f7\u540e\u9762\u5e94\u8be5\u63a5\u7684\u662f\u4e2a\u8868\u4e2d\u7684\u5217\u540d\uff0c\u800c\u4e0d\u662ffrom\u5173\u952e\u5b57\u3002<\/li>\n<li>1064\u7684\u9519\u8bef\u4fe1\u606f\u4e00\u822c\u6700\u540e\u4f1a\u6709\u4e2a&#8230; near &#8216;&#8230;&#8217;\u683c\u5f0f\u7684\u4fe1\u606f\uff0cnear\u540e\u9762\u7684\u5f15\u7528\u5c31\u662fsql\u8bed\u53e5\u5f00\u59cb\u65e0\u6cd5\u88ab\u89e3\u6790\u7684\u5730\u65b9\uff0c\u5f53\u9047\u5230\u8fd9\u4e2a\u9519\u8bef\uff0c\u591a\u89c2\u5bdf\u8fd9\u6bb5\u65e0\u6cd5\u89e3\u6790\u7684sql\u8bed\u53e5\u524d\u540e\u7684\u5b57\u7b26\u3002<\/li>\n<li>\u6709\u65f6\u5019\uff0c\u4f60\u5f97\u5230\u7684\u9519\u8bef\u4fe1\u606f\u662f&#8230; near &#8221;\uff0cnear\u540e\u9762\u7684\u5f15\u7528\u662f\u7a7a\u7684\uff0c\u8fd9\u8868\u793a\u51fa\u9519\u7684\u5730\u65b9\u4f4d\u4e8esql\u8bed\u53e5\u7684\u5f00\u5934\u6216\u8005\u7b2c\u4e00\u4e2a\u5b57\u7b26\uff0c\u901a\u5e38\u60c5\u51b5\u662f\u5355\u5f15\u53f7\u3001\u5f15\u53f7\u3001\u62ec\u53f7\u6ca1\u6709\u6210\u5bf9\u51fa\u73b0\u6216\u8005\u662f\u7ed3\u5c3e\u5904\u6ca1\u6709\u6b63\u786e\u7684\u5b57\u7b26\uff0c\u5982\u4e2d\u6587\u5206\u53f7\u3002<\/li>\n<li>\u5982\u679c\u53d1\u73b0\u4e861064\u9519\u8bef\uff0c\u6ce8\u610f\u67e5\u770b\u62a5\u9519\u4fe1\u606f\u91cc\u5f15\u7528\u7684sql\u8bed\u53e5\uff0c\u591a\u67e5\u770b\u8fd9\u4e2a\u9519\u8bef\u7684sql\u8bed\u53e5\u524d\u540e\u90e8\u5206\u3002<\/li>\n<li>\u5982\u679c\u6709\u4eba\u5411\u4f60\u8be2\u95ee1064\u7684sql\u9519\u8bef\uff0c\u4f60\u6700\u597d\u8ba9\u4ed6\u7ed9\u4f60\u63d0\u4f9b\u5b8c\u6574\u7684sql\u8bed\u53e5\u548c\u62a5\u9519\u4fe1\u606f\u3002<\/li>\n<\/ul>\n<p><strong>Error code 1175: Safe Update<\/strong><\/p>\n<p>\u8fd9\u4e2a\u9519\u8bef\u662f\u7531\u4e8e\u4f60\u6267\u884cupdate\u6216\u8005delete\u8bed\u53e5\u65f6\uff0c\u6ca1\u6709\u6307\u5b9awhere\u6761\u4ef6\uff0c\u5982\u679c\u60f3\u5ffd\u7565\u8fd9\u4e2a\u9519\u8bef\uff0c\u5219\u4fee\u6539\u914d\u7f6e<\/p>\n<ol class=\"dp-sql\">\n<li class=\"alt\"><span class=\"keyword\">SET<\/span>\u00a0SQL_SAFE_UPDATES\u00a0=\u00a00;<\/li>\n<\/ol>\n<p>\u91cd\u65b0\u6253\u5f00\u9519\u8bef\u63d0\u9192<\/p>\n<ol class=\"dp-sql\">\n<li class=\"alt\"><span class=\"keyword\">SET<\/span>\u00a0SQL_SAFE_UPDATES\u00a0=\u00a01;<\/li>\n<\/ol>\n<ul>\n<li>1067, 1292, 1366, 1411 &#8211; Bad Value for number, date, default, etc.<\/li>\n<li>1067\u8fd9\u4e2a\u9519\u8bef\u548cTINESTAMP\u9ed8\u8ba4\u503c\u6709\u5173\uff0c\u9700\u67e5\u770b\u5b98\u65b9\u6587\u6863<\/li>\n<li>1292\/1366 double\u548cinteger\u7c7b\u578b\u9519\u8bef\uff0c\u68c0\u67e5\u8bed\u6cd5\u548c\u6570\u503c\u7c7b\u578b<\/li>\n<li>1292 detatime\u9519\u8bef\uff0c\u68c0\u67e5\u63d2\u5165\u7684\u65f6\u95f4\u6570\u636e\u683c\u5f0f\uff0c\u662f\u5426\u8d85\u51fa\u8303\u56f4\uff0c\u5e26\u65f6\u533a\u683c\u5f0f\u7684\u65f6\u95f4\u5b57\u7b26\u4e32\u683c\u5f0f\u662f\u5426\u6709\u95ee\u9898<\/li>\n<li>1292 VARIABLE \u68c0\u67e5\u4f60\u8bbe\u7f6e\u7684VARIABLE\u5c5e\u6027<\/li>\n<li>1292 LOAD DATA \u68c0\u67e5\u8f6c\u4e49\u5b57\u7b26\uff0c\u68c0\u67e5\u6570\u636e\u7c7b\u578b<\/li>\n<li>1411 STR_TO_DATE \u68c0\u67e5\u65f6\u95f4\u5b57\u7b26\u4e32\u683c\u5f0f<\/li>\n<\/ul>\n<p><strong>1045 Access denied<\/strong><\/p>\n<p>\u6743\u9650\u9519\u8bef\uff0c\u68c0\u67e5\u7528\u6237\u540d\u5bc6\u7801\u662f\u5426\u6b63\u786e\uff0c\u68c0\u67e5\u5f53\u524d\u7528\u6237\u662f\u5426\u6709\u6743\u9650\u8bbf\u95ee\u6570\u636e\u3002<\/p>\n<p><strong>1236 &#8220;impossible position&#8221; in Replication<\/strong><\/p>\n<ul>\n<li>\u901a\u5e38\u60c5\u51b5\u4e0b\uff0c\u8fd9\u662f\u7531\u4e8emysql\u4e3b\u8282\u70b9\u6302\u6389\u4e86\u5e76\u4e14sync_binlog=OFF\uff0c\u89e3\u51b3\u65b9\u6cd5\u662f\u5728\u4ece\u8282\u70b9\u8bbe\u7f6e POS=0\u3002<\/li>\n<li>\u5f53sync_binlog=OFF\u65f6\uff0c\u4e3b\u8282\u70b9\u4f1a\u5728\u628a\u6570\u636e\u5148\u53d1\u7ed9\u4ece\u8282\u70b9\uff0c\u7136\u540e\u5199binlog\u3002\u5f53\u4e3b\u8282\u70b9\u5728\u5199binlog\u4e4b\u524d\u6302\u6389\u4e86\uff0c\u8fd9\u65f6\u5019\u7531\u4e8e\u5df2\u7ecf\u628a\u6570\u636e\u53d1\u7ed9\u4ece\u8282\u70b9\u4e86\uff0c\u6240\u4ee5\u4ece\u8282\u70b9\u5728\u5199\u5b8c\u6570\u636e\u540e\uff0cbinlog\u88ab\u66f4\u65b0\uff0c\u5bfc\u81f4\u4e3b\u8282\u70b9\u548c\u4ece\u8282\u70b9binlog\u6307\u9488\u4f4d\u7f6e\u4e0d\u4e00\u81f4\u3002\u6240\u4ee5\uff0c\u5f53\u4e3b\u8282\u70b9\u91cd\u65b0\u542f\u52a8\u540e\uff0c\u4f1a\u5f00\u542f\u4e00\u4e2a\u65b0\u7684binlog\uff0c\u6240\u4ee5\u8fd9\u65f6\u5019\u628a\u4ece\u8282\u70b9\u7684binlog\u6307\u9488\u4f4d\u7f6e\u8bbe\u7f6e\u4e3a0\uff0c\u4ece\u5934\u91cd\u65b0\u5f00\u59cb\u3002<\/li>\n<li>\u6700\u597d\u7684\u89e3\u51b3\u65b9\u6cd5\u8bbe\u7f6esync_binlog=ON,\u8fd9\u6837\u57fa\u4e8ebinlog\u540c\u6b65\uff0c\u4f46\u4f1a\u5e26\u6765\u8f83\u591a\u7684i\/o\u5f00\u9500\u3002<\/li>\n<\/ul>\n<p><strong>24 Can&#8217;t open file (Too many open files)<\/strong><\/p>\n<p>open_files_limit\u662f\u4e2a\u7cfb\u7edf\u7684\u8bbe\u7f6e\uff0ctable_open_cache\u5fc5\u987b\u6bd4\u7cfb\u7edf\u7684\u8fd9\u4e2a\u914d\u7f6e\u5c0f<\/p>\n<p><strong>1062 &#8211; Duplicate Entry<\/strong><\/p>\n<p>\u8fd9\u4e2a\u9519\u8bef\u901a\u5e38\u6709\u4ee5\u4e0b\u51e0\u4e2a\u539f\u56e0<\/p>\n<p>\u4e3b\u952e\u7ea6\u675f\uff0cError Code: 1062. Duplicate entry \u201812\u2019 for key \u2018PRIMARY\u2019\uff0c\u4e3b\u952e\u7ea6\u675f\u7684\u6570\u636e\u5fc5\u987b\u662f\u552f\u4e00\u7684\uff0c\u89e3\u51b3\u7684\u65b9\u6cd5\u4e4b\u4e00\u662f\u8bbe\u7f6e\u4e3b\u952e\u662f\u81ea\u589e\u7684\uff0c\u8fd9\u6837\uff0c\u63d2\u5165\u6570\u636e\u65f6\uff0c\u8bbe\u7f6e\u4e3b\u952e\u7684\u6570\u636e\u4e3aNULL\u3002<\/p>\n<p>\u552f\u4e00\u5c5e\u6027\u7ea6\u675f\uff0cError Code: 1062. Duplicate entry \u2018A\u2019 for key \u2018code\u2019\uff0c\u8fd9\u662f\u4f60\u8bbe\u7f6e\u4e86\u6570\u636e\u662f\u552f\u4e00\u7684\uff0c\u4f46\u63d2\u5165\u7684\u6570\u636e\u548c\u8868\u4e2d\u6570\u636e\u91cd\u590d\u4e86\uff0c\u89e3\u51b3\u7684\u65b9\u6cd5\u662f\u4f7f\u7528INSERT IGNORE\u4ee3\u66ffINSERT\uff0cINSERT IGNORE\u63d2\u5165\u6570\u636e\u7684\u65f6\u5019\uff0c\u5982\u679c\u91cd\u590d\u4e86\uff0c\u5c31\u4e0d\u505a\u4efb\u4f55\u64cd\u4f5c\uff0c\u4e5f\u4e0d\u62a5\u9519\uff0c\u5982\u679c\u4e0d\u91cd\u590d\uff0c\u5c31\u548cINSERT\u884c\u4e3a\u4e00\u81f4\uff0c\u63d2\u5165\u6570\u636e\u3002<\/p>\n<p><strong>126, 127, 134, 144, 145<\/strong><\/p>\n<p>\u5f53\u4f60\u8bbf\u95ee\u6570\u636e\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u8fd9\u4e9b\u9519\u8bef\u3002\u8fd9\u662f\u9519\u8bef\u662f\u7531\u4e8emysql\u6570\u636e\u5e93\u5185\u90e8\u9519\u8bef\u5f15\u8d77\u7684\u3002\u6bd4\u5982\uff1a<\/p>\n<ol class=\"dp-sql\">\n<li class=\"alt\">MySQL\u00a0error\u00a0code\u00a0126\u00a0=\u00a0<span class=\"keyword\">Index<\/span>\u00a0file\u00a0<span class=\"keyword\">is<\/span>\u00a0crashed<\/li>\n<li><\/li>\n<li class=\"alt\">MySQL\u00a0error\u00a0code\u00a0127\u00a0=\u00a0Record-file\u00a0<span class=\"keyword\">is<\/span>\u00a0crashed<\/li>\n<li><\/li>\n<li class=\"alt\">MySQL\u00a0error\u00a0code\u00a0134\u00a0=\u00a0Record\u00a0was\u00a0already\u00a0deleted\u00a0(<span class=\"op\">or<\/span>\u00a0record\u00a0file\u00a0crashed)<\/li>\n<li><\/li>\n<li class=\"alt\">MySQL\u00a0error\u00a0code\u00a0144\u00a0=\u00a0<span class=\"keyword\">Table<\/span>\u00a0<span class=\"keyword\">is<\/span>\u00a0crashed\u00a0<span class=\"op\">and<\/span>\u00a0<span class=\"keyword\">last<\/span>\u00a0repair\u00a0failed<\/li>\n<li><\/li>\n<li class=\"alt\">MySQL\u00a0error\u00a0code\u00a0145\u00a0=\u00a0<span class=\"keyword\">Table<\/span>\u00a0was\u00a0marked\u00a0<span class=\"keyword\">as<\/span>\u00a0crashed\u00a0<span class=\"op\">and<\/span>\u00a0should\u00a0be\u00a0repaired<\/li>\n<\/ol>\n<p>mysql\u7684bug\uff0c\u88ab\u653b\u51fb\u4e86\uff0c\u670d\u52a1\u6302\u4e86\uff0c\u4e0d\u6b63\u786e\u7684\u5173\u95edmysql\uff0c\u635f\u574f\u7684\u6570\u636e\u90fd\u6709\u53ef\u80fd\u9020\u6210\u8fd9\u4e9b\u95ee\u9898\u3002\u5f53\u8fd9\u4e9b\u9519\u8bef\u53d1\u751f\u65f6\uff0c\u6570\u636e\u5c31\u65e0\u6cd5\u8bbf\u95ee\u4e86\uff0c\u5e76\u4e14\u4e00\u76f4\u6c38\u4e45\u7684\u65e0\u6cd5\u8bbf\u95ee\u3002\u6240\u4ee5\uff0c\u6700\u597d\u628a\u6570\u636e\u505a\u597d\u5907\u4efd\uff0c\u5982\u679c\u4f60\u6ca1\u6709\u5907\u4efd\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u53bb\u4fee\u590dmysql\u3002\u5982\u679c\u5b58\u50a8\u5f15\u64ce\u662fMyISAM\uff0c\u4f7f\u7528CHECK TABLE\u548cREPAIR TABLE\u547d\u4ee4(mysql&gt;=5.7)\u3002<\/p>\n<ol class=\"dp-sql\">\n<li class=\"alt\"><span class=\"keyword\">CHECK<\/span>\u00a0<span class=\"keyword\">TABLE<\/span>\u00a0&lt;<span class=\"keyword\">table<\/span>\u00a0<span class=\"keyword\">name<\/span>&gt;\u00a0\/\/\/\/<span class=\"keyword\">To<\/span>\u00a0<span class=\"keyword\">check<\/span>\u00a0the\u00a0extent\u00a0<span class=\"keyword\">of<\/span>\u00a0<span class=\"keyword\">database<\/span>\u00a0corruption<\/li>\n<li><\/li>\n<li class=\"alt\">REPAIR\u00a0<span class=\"keyword\">TABLE<\/span>\u00a0&lt;<span class=\"keyword\">table<\/span>\u00a0<span class=\"keyword\">name<\/span>&gt;\u00a0\/\/\/\/<span class=\"keyword\">To<\/span>\u00a0repair\u00a0<span class=\"keyword\">table<\/span><\/li>\n<\/ol>\n<p><strong>1366<\/strong><\/p>\n<p>\u8fd9\u901a\u5e38\u610f\u5473\u7740\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u5b57\u7b26\u96c6\u5904\u7406\u4e0d\u4e00\u81f4\u3002<\/p>\n<p><strong>139<\/strong><\/p>\n<p>\u9519\u8bef139\u53ef\u80fd\u610f\u5473\u7740\u8868\u5b9a\u4e49\u4e2d\u5b57\u6bb5\u7684\u6570\u91cf\u548c\u5927\u5c0f\u8d85\u8fc7\u4e86\u4e00\u4e9b\u9650\u5236\u3002\u68c0\u67e5sql\u8bed\u53e5\u4e2d\u5f02\u5e38\u957f\u7684\u5b57\u7b26\u4e32\uff0c\u5f02\u5e38\u5927\u7684\u6574\u6570\u7b49\u7b49<\/p>\n<p><strong>2002, 2003 Cannot connect<\/strong><\/p>\n<p>\u65e0\u6cd5\u8fde\u63a5\uff0c\u5982\u679c\u670d\u52a1\u6b63\u5e38\u542f\u52a8\uff0c\u68c0\u67e5\u4ee5\u4e0b\u53ef\u80fd\u7684\u9879\u76ee<\/p>\n<p>1\u3001\u662f\u4e0d\u662f\u9632\u706b\u5899\u7684\u95ee\u9898\uff0c\u5173\u95ed\u9632\u706b\u5899\u8bd5\u8bd5<\/p>\n<p>2\u3001\u68c0\u67e5mysql\u670d\u52a1\u76d1\u542c\u7684IP<\/p>\n<p>3\u3001\u68c0\u67e5skip-name-resolve<\/p>\n<p>4\u3001\u68c0\u67e5socket\u6587\u4ef6\u8def\u5f84<\/p>\n<p><strong>2014 Commands out of sync; you can&#8217;t run this command now<\/strong><\/p>\n<p>\u8fd9\u4e2a\u662f\u7531\u4e8e\u4f60\u8fd0\u884csql\u67e5\u8be2\u8bed\u53e5\u7684\u5e8f\u5217\u4e0d\u6b63\u786e\u9020\u6210\u7684\uff0c\u5b98\u65b9\u7684\u89e3\u91ca<\/p>\n<ol class=\"dp-sql\">\n<li class=\"alt\">This\u00a0can\u00a0happen,\u00a0<span class=\"keyword\">for<\/span>\u00a0example,\u00a0if\u00a0you\u00a0are\u00a0using\u00a0mysql_use_result()\u00a0<span class=\"op\">and<\/span>\u00a0try\u00a0<span class=\"keyword\">to<\/span>\u00a0<span class=\"keyword\">execute<\/span>\u00a0a\u00a0new\u00a0query\u00a0before\u00a0you\u00a0have\u00a0called\u00a0mysql_free_result().\u00a0It\u00a0can\u00a0also\u00a0happen\u00a0if\u00a0you\u00a0try\u00a0<span class=\"keyword\">to<\/span>\u00a0<span class=\"keyword\">execute<\/span>\u00a0two\u00a0queries\u00a0that\u00a0<span class=\"keyword\">return<\/span>\u00a0data\u00a0without\u00a0calling\u00a0mysql_use_result()\u00a0<span class=\"op\">or<\/span>\u00a0mysql_store_result()\u00a0<span class=\"op\">in<\/span>\u00a0<span class=\"op\">between<\/span>.<\/li>\n<\/ol>\n<p>\u603b\u7ed3\u8d77\u6765\u610f\u601d\u5c31\u662f\u4f60\u67e5\u8be2\u4e86\u7ed3\u679c\uff0c\u4f46\u662f\u5374\u6ca1\u6709\u628a\u7ed3\u679c\u83b7\u53d6\u4e0b\u6765\u3002\u9020\u6210mysql server\u4e00\u76f4\u5728\u7b49\u4f60\u628a\u7ed3\u679c\u53d6\u8d70\u3002<\/p>\n<p><strong>1215: Cannot add foreign key constraint<\/strong><\/p>\n<p>\u6dfb\u52a0\u5916\u952e\u9519\u8bef\uff0c\u68c0\u67e5\u5916\u952e\u5173\u8054\u7684\u4e24\u4e2a\u5b57\u6bb5\u6570\u636e\u7c7b\u578b\u662f\u5426\u4e00\u81f4\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Error code 1064: Syntax error \u5047\u8bbe\u6709\u4e00\u4e2asql\u8bed\u53e5 select\u00a0LastNam [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[15],"_links":{"self":[{"href":"http:\/\/www.jdde.cn\/index.php?rest_route=\/wp\/v2\/posts\/131"}],"collection":[{"href":"http:\/\/www.jdde.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jdde.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jdde.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jdde.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=131"}],"version-history":[{"count":2,"href":"http:\/\/www.jdde.cn\/index.php?rest_route=\/wp\/v2\/posts\/131\/revisions"}],"predecessor-version":[{"id":149,"href":"http:\/\/www.jdde.cn\/index.php?rest_route=\/wp\/v2\/posts\/131\/revisions\/149"}],"wp:attachment":[{"href":"http:\/\/www.jdde.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jdde.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=131"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jdde.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}