{"id":56365,"date":"2024-10-10T11:10:18","date_gmt":"2024-10-10T03:10:18","guid":{"rendered":"https:\/\/server.hk\/cnblog\/56365\/"},"modified":"2024-10-10T11:10:18","modified_gmt":"2024-10-10T03:10:18","slug":"wordpress-%e6%95%99%e7%a8%8b%ef%bc%9a%e5%a6%82%e4%bd%95%e4%bf%ae%e5%be%a9-mysql-%e6%95%b8%e6%93%9a%e5%ba%ab-1064-%e9%8c%af%e8%aa%a4","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/56365\/","title":{"rendered":"WordPress \u6559\u7a0b\uff1a\u5982\u4f55\u4fee\u5fa9 MySQL \u6578\u64da\u5eab 1064 \u932f\u8aa4"},"content":{"rendered":"<h1 id=\"wordpress-%e6%95%99%e7%a8%8b%ef%bc%9a%e5%a6%82%e4%bd%95%e4%bf%ae%e5%be%a9-mysql-%e6%95%b8%e6%93%9a%e5%ba%ab-1064-%e9%8c%af%e8%aa%a4-uznTZgsSHl\">WordPress \u6559\u7a0b\uff1a\u5982\u4f55\u4fee\u5fa9 MySQL \u6578\u64da\u5eab 1064 \u932f\u8aa4<\/h1>\n<p>\u5728\u4f7f\u7528 WordPress \u6642\uff0c\u60a8\u53ef\u80fd\u6703\u9047\u5230 MySQL \u6578\u64da\u5eab\u932f\u8aa4\uff0c\u7279\u5225\u662f 1064 \u932f\u8aa4\u3002\u9019\u500b\u932f\u8aa4\u901a\u5e38\u8868\u793a SQL \u8a9e\u6cd5\u932f\u8aa4\uff0c\u53ef\u80fd\u662f\u7531\u65bc\u4e0d\u6b63\u78ba\u7684\u67e5\u8a62\u8a9e\u53e5\u6216\u4e0d\u6b63\u78ba\u7684\u6578\u64da\u5eab\u7d50\u69cb\u5f15\u8d77\u7684\u3002\u672c\u6587\u5c07\u6307\u5c0e\u60a8\u5982\u4f55\u8b58\u5225\u548c\u4fee\u5fa9\u9019\u500b\u554f\u984c\u3002<\/p>\n<h2 id=\"%e4%bb%80%e9%ba%bc%e6%98%af-mysql-1064-%e9%8c%af%e8%aa%a4%ef%bc%9f-uznTZgsSHl\">\u4ec0\u9ebc\u662f MySQL 1064 \u932f\u8aa4\uff1f<\/h2>\n<p>MySQL 1064 \u932f\u8aa4\u662f\u6307 SQL \u8a9e\u6cd5\u932f\u8aa4\u3002\u7576\u60a8\u57f7\u884c\u4e00\u500b SQL \u67e5\u8a62\u6642\uff0c\u5982\u679c MySQL \u7121\u6cd5\u7406\u89e3\u8a72\u67e5\u8a62\uff0c\u5247\u6703\u8fd4\u56de\u6b64\u932f\u8aa4\u3002\u9019\u53ef\u80fd\u662f\u7531\u65bc\u591a\u7a2e\u539f\u56e0\uff0c\u4f8b\u5982\uff1a<\/p>\n<ul>\n<li>\u62fc\u5beb\u932f\u8aa4<\/li>\n<li>\u7f3a\u5c11\u5fc5\u8981\u7684\u95dc\u9375\u5b57<\/li>\n<li>\u4e0d\u6b63\u78ba\u7684\u6578\u64da\u985e\u578b<\/li>\n<li>\u4e0d\u6b63\u78ba\u7684\u8868\u540d\u6216\u5217\u540d<\/li>\n<\/ul>\n<h2 id=\"%e5%a6%82%e4%bd%95%e8%ad%98%e5%88%a5-mysql-1064-%e9%8c%af%e8%aa%a4-uznTZgsSHl\">\u5982\u4f55\u8b58\u5225 MySQL 1064 \u932f\u8aa4<\/h2>\n<p>\u7576\u60a8\u5728 WordPress \u4e2d\u9047\u5230 1064 \u932f\u8aa4\u6642\uff0c\u901a\u5e38\u6703\u770b\u5230\u985e\u4f3c\u4ee5\u4e0b\u7684\u932f\u8aa4\u4fe1\u606f\uff1a<\/p>\n<pre>\nWordPress \u6570\u636e\u5e93\u9519\u8bef: [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 '...' at line ...]\n<\/pre>\n<p>\u9019\u6bb5\u4fe1\u606f\u6703\u544a\u8a34\u60a8\u51fa\u932f\u7684 SQL \u8a9e\u53e5\u53ca\u5176\u4f4d\u7f6e\uff0c\u5e6b\u52a9\u60a8\u5b9a\u4f4d\u554f\u984c\u3002<\/p>\n<h2 id=\"%e4%bf%ae%e5%be%a9-mysql-1064-%e9%8c%af%e8%aa%a4%e7%9a%84%e6%ad%a5%e9%a9%9f-uznTZgsSHl\">\u4fee\u5fa9 MySQL 1064 \u932f\u8aa4\u7684\u6b65\u9a5f<\/h2>\n<h3 id=\"1-%e6%aa%a2%e6%9f%a5-sql-%e8%aa%9e%e6%b3%95-uznTZgsSHl\">1. \u6aa2\u67e5 SQL \u8a9e\u6cd5<\/h3>\n<p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u6aa2\u67e5\u51fa\u932f\u7684 SQL \u8a9e\u53e5\u3002\u78ba\u4fdd\u6240\u6709\u7684\u95dc\u9375\u5b57\u3001\u8868\u540d\u548c\u5217\u540d\u90fd\u6b63\u78ba\u7121\u8aa4\u3002\u4f8b\u5982\uff1a<\/p>\n<pre>\nSELECT * FROM users WHERE username = 'admin'\n<\/pre>\n<p>\u5728\u9019\u500b\u4f8b\u5b50\u4e2d\uff0c\u78ba\u4fdd\u8868\u540d &#8220;users&#8221; \u548c\u5217\u540d &#8220;username&#8221; \u662f\u6b63\u78ba\u7684\u3002<\/p>\n<h3 id=\"2-%e6%aa%a2%e6%9f%a5%e6%8f%92%e4%bb%b6%e5%92%8c%e4%b8%bb%e9%a1%8c-uznTZgsSHl\">2. \u6aa2\u67e5\u63d2\u4ef6\u548c\u4e3b\u984c<\/h3>\n<p>\u6709\u6642\u5019\uff0c\u63d2\u4ef6\u6216\u4e3b\u984c\u4e2d\u7684\u4ee3\u78bc\u53ef\u80fd\u6703\u5c0e\u81f4 SQL \u8a9e\u6cd5\u932f\u8aa4\u3002\u60a8\u53ef\u4ee5\u901a\u904e\u7981\u7528\u6240\u6709\u63d2\u4ef6\u4f86\u6aa2\u67e5\u662f\u5426\u662f\u63d2\u4ef6\u5f15\u8d77\u7684\u554f\u984c\u3002\u5982\u679c\u7981\u7528\u63d2\u4ef6\u5f8c\u554f\u984c\u89e3\u6c7a\uff0c\u5247\u9010\u500b\u555f\u7528\u63d2\u4ef6\u4ee5\u627e\u51fa\u554f\u984c\u63d2\u4ef6\u3002<\/p>\n<h3 id=\"3-%e6%9b%b4%e6%96%b0%e6%95%b8%e6%93%9a%e5%ba%ab-uznTZgsSHl\">3. \u66f4\u65b0\u6578\u64da\u5eab<\/h3>\n<p>\u5982\u679c\u60a8\u6700\u8fd1\u66f4\u65b0\u4e86 WordPress \u6216\u67d0\u500b\u63d2\u4ef6\uff0c\u53ef\u80fd\u9700\u8981\u66f4\u65b0\u6578\u64da\u5eab\u7d50\u69cb\u3002\u60a8\u53ef\u4ee5\u901a\u904e WordPress \u5f8c\u53f0\u9032\u884c\u6578\u64da\u5eab\u66f4\u65b0\uff0c\u901a\u5e38\u5728\u66f4\u65b0\u5f8c\u6703\u63d0\u793a\u60a8\u9032\u884c\u6578\u64da\u5eab\u5347\u7d1a\u3002<\/p>\n<h3 id=\"4-%e4%bd%bf%e7%94%a8-phpmyadmin-%e4%bf%ae%e5%be%a9%e6%95%b8%e6%93%9a%e5%ba%ab-uznTZgsSHl\">4. \u4f7f\u7528 phpMyAdmin \u4fee\u5fa9\u6578\u64da\u5eab<\/h3>\n<p>\u5982\u679c\u4ee5\u4e0a\u65b9\u6cd5\u7121\u6cd5\u89e3\u6c7a\u554f\u984c\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528 phpMyAdmin \u4f86\u4fee\u5fa9\u6578\u64da\u5eab\u3002\u6b65\u9a5f\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li>\u767b\u9304\u5230\u60a8\u7684 phpMyAdmin\u3002<\/li>\n<li>\u9078\u64c7\u60a8\u7684 WordPress \u6578\u64da\u5eab\u3002<\/li>\n<li>\u9078\u64c7\u6240\u6709\u8868\uff0c\u7136\u5f8c\u9078\u64c7\u201c\u4fee\u5fa9\u8868\u201d\u9078\u9805\u3002<\/li>\n<\/ol>\n<h3 id=\"5-%e6%aa%a2%e6%9f%a5%e6%95%b8%e6%93%9a%e5%ba%ab%e7%89%88%e6%9c%ac-uznTZgsSHl\">5. \u6aa2\u67e5\u6578\u64da\u5eab\u7248\u672c<\/h3>\n<p>\u78ba\u4fdd\u60a8\u7684 MySQL \u7248\u672c\u8207 WordPress \u517c\u5bb9\u3002\u67d0\u4e9b SQL \u8a9e\u6cd5\u5728\u4e0d\u540c\u7248\u672c\u7684 MySQL \u4e2d\u53ef\u80fd\u6703\u6709\u6240\u4e0d\u540c\u3002\u60a8\u53ef\u4ee5\u901a\u904e\u57f7\u884c\u4ee5\u4e0b\u547d\u4ee4\u4f86\u6aa2\u67e5 MySQL \u7248\u672c\uff1a<\/p>\n<pre>\nSELECT VERSION();\n<\/pre>\n<h2 id=\"%e7%b8%bd%e7%b5%90-uznTZgsSHl\">\u7e3d\u7d50<\/h2>\n<p>MySQL 1064 \u932f\u8aa4\u901a\u5e38\u662f\u7531\u65bc SQL \u8a9e\u6cd5\u932f\u8aa4\u5f15\u8d77\u7684\u3002\u901a\u904e\u6aa2\u67e5 SQL \u8a9e\u6cd5\u3001\u7981\u7528\u63d2\u4ef6\u3001\u66f4\u65b0\u6578\u64da\u5eab\u3001\u4f7f\u7528 phpMyAdmin \u4fee\u5fa9\u6578\u64da\u5eab\u4ee5\u53ca\u6aa2\u67e5 MySQL \u7248\u672c\uff0c\u60a8\u53ef\u4ee5\u6709\u6548\u5730\u89e3\u6c7a\u9019\u500b\u554f\u984c\u3002\u5982\u679c\u60a8\u9700\u8981\u7a69\u5b9a\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2f VPS<\/a> \u4f86\u904b\u884c\u60a8\u7684 WordPress \u7db2\u7ad9\uff0c\u8acb\u8003\u616e\u9078\u64c7\u5408\u9069\u7684\u670d\u52d9\u5668\u65b9\u6848\uff0c\u4ee5\u78ba\u4fdd\u60a8\u7684\u7db2\u7ad9\u904b\u884c\u9806\u5229\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b78\u7fd2\u5982\u4f55\u4fee\u5fa9 WordPress \u4e2d\u7684 MySQL \u6578\u64da\u5eab 1064 \u932f\u8aa4\uff0c\u63d0\u5347\u7db2\u7ad9\u6027\u80fd\uff0c\u78ba\u4fdd\u6578\u64da\u5b89\u5168\u8207\u7a69\u5b9a\u904b\u884c\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4925],"tags":[],"class_list":["post-56365","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/56365","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=56365"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/56365\/revisions"}],"predecessor-version":[{"id":56366,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/56365\/revisions\/56366"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=56365"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=56365"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=56365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}