{"id":130,"date":"2023-06-05T12:37:35","date_gmt":"2023-06-05T04:37:35","guid":{"rendered":"http:\/\/pro369.com\/sale\/?p=130"},"modified":"2019-05-14T08:31:20","modified_gmt":"2019-07-14T08:31:20","slug":"%e5%8e%9f%e6%9c%ac%e7%94%a8-mysql-40-%e8%80%8c%e5%90%8c%e6%99%82%e8%a6%81%e5%8d%87%e7%b4%9a%e5%88%b0-mysql-41-%e4%b8%ad%e6%96%87%e4%ba%82%e7%a2%bc%e7%9a%84%e8%a7%a3%e6%b1%ba%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/por.tw\/sale\/%e5%8e%9f%e6%9c%ac%e7%94%a8-mysql-40-%e8%80%8c%e5%90%8c%e6%99%82%e8%a6%81%e5%8d%87%e7%b4%9a%e5%88%b0-mysql-41-%e4%b8%ad%e6%96%87%e4%ba%82%e7%a2%bc%e7%9a%84%e8%a7%a3%e6%b1%ba%e6%96%b9%e6%b3%95\/","title":{"rendered":"\u539f\u672c\u7528 mysql 4.0 \u800c\u540c\u6642\u8981\u5347\u7d1a\u5230 mysql 4.1-\u4e2d\u6587\u4e82\u78bc\u7684\u89e3\u6c7a\u65b9\u6cd5"},"content":{"rendered":"<p><strong><font size=\"2\" color=\"#ff00ff\">\u539f\u672c\u7528 mysql 4.0 \u800c\u540c\u6642\u8981\u5347\u7d1a\u5230 mysql 4.1-\u4e2d\u6587\u4e82\u78bc\u7684\u89e3\u6c7a\u65b9\u6cd5<\/font><\/strong><\/p>\n<p><font size=\"2\">\u5927\u90e8\u4efd\u4eba\u5347\u7d1awordpress 1.5\u6642\u78b0\u5230\u7684\u554f\u984c\u90fd\u662f\u4e2d\u6587\u4e82\u78bc\uff0c\u5c24\u5176\u662f\u5982\u679c\u539f\u672c\u7528 mysql 4.0 \u800c\u540c\u6642\u8981\u5347\u7d1a\u5230 mysql 4.1\u7684\u8a71\u3002<\/font><\/p>\n<p><font size=\"2\">\u4e3b\u8981\u539f\u56e0\u662fmysql 4.1\u5728\u8a9e\u7cfb\u65b9\u9762\u589e\u52a0\u4e86\u8a31\u591a\u529f\u80fd\uff0c\u5b83\u53ef\u4ee5\u8a2d\u5b9a\u8a9e\u7cfb\u7684\u5c64\u6b21\u5f9e\u6700\u5e95\u5c64\u7684 server, database \u5230\u55ae\u4e00 table, column, connection \u90fd\u53ef\u4ee5\u8a2d\u5b9a\uff0c\u800c\u9664\u4e86\u8a9e\u7cfb\u4e4b\u5916\uff0c\u9084\u53ef\u4ee5\u6307\u5b9a\u642d\u914d\u4e0d\u540c\u7684 collation\uff0c\u6240\u4ee5\u7d44\u5408\u767e\u767e\u7a2e\uff0c\u53ea\u8981\u4e00\u500b\u932f\u4e86\u5c31\u96e3\u9003\u4e82\u78bc\u7684\u547d\u904b\u3002<br \/> (\u800c\u4e4b\u524d\u7528mysql 4.0\u70ba\u4f55\u4e0d\u7528\u8a2d\u5b9a\u4e5f\u4e0d\u6703\u51fa\u554f\u984c\u5462\uff1f\u4e3b\u8981\u539f\u56e0\u662f\u90a3\u6642\u9810\u8a2d\u662f latin-1\uff0c\u6b63\u597d\u76f8\u5bb9\u5927\u90e8\u4efd\u7684utf-8\u5b57\u5143\uff0c\u6240\u4ee5\u4e0d\u5e38\u78b0\u5230\u4e82\u78bc)<\/font><\/p>\n<p><font size=\"2\">\u6240\u4ee5\u5982\u679c\u4f60\u7684\u60c5\u6cc1\u8ddf\u6211\u4e00\u6a23\uff0c\u540c\u6642\u8981\u5c07 wordpress \u5f9e v1.2\u5347\u7d1a\u5230 v1.5, \u7136\u5f8cmysql\u4e5f\u8981 v4.0 \u5347\u7d1a\u5230 v4.1 \u7684\u8a71\uff0c\u8acb\u770b\u4e0b\u9762\u6d41\u7a0b\uff1a<br \/> A. \u5148\u9032phpmyadmin\u627e\u5230\u53ef\u8f38\u5165 sql query\u7684\u756b\u9762\uff0c\u7136\u5f8c\u9375\u5165\uff1a<br \/> show variables like \u300e%character%\u300f;<\/font><\/p>\n<p><font size=\"2\">\u9019\u53e5\u8a71\u6703\u986f\u793a\u76ee\u524d\u8cc7\u6599\u5eab\u4f7f\u7528\u7684\u8a9e\u7cfb\u8a2d\u5b9a\uff0c\u4e00\u822c\u570b\u5916\u7684\u7db2\u7ad9\u6216\u525b\u88dd\u597d\u7684 mysql 4.1\u9810\u8a2d\u90fd\u662f latin-1\u3002<\/font><\/p>\n<p><font size=\"2\">B. \u65b0\u589ewordpress blog\u8981\u7528\u7684database\u540d\u7a31\uff0c\u4f8b\u5982 myblog.<\/font><\/p>\n<p><font size=\"2\">\u5982\u679c\u4f60\u719f\u6089 phpmyadmin \u7684\u52d5\u4f5c\uff0c\u5728\u756b\u9762\u4e0a\u5c31\u53ef\u4ee5\u9078\u53d6\u9019\u500b\u65b0database \u8981\u7528\u7684\u8a9e\u7cfb\uff0c<\/font><\/p>\n<p><font size=\"2\">charset \u8acb\u9078\u53d6 UTF-8 Unicode (utf8)<br \/> collation \u8acb\u9078\u53d6 utf8_general_ci (ci \u4ee3\u8868 case insensitve \u5927\u5c0f\u5beb\u6c92\u5dee)<\/font><\/p>\n<p><font size=\"2\">C.\u6539 database\u8a9e\u7cfb\uff0c\u540c\u6a23\u5728 phpmyadmin \u7684query\u756b\u9762\u9375\u5165\u4e0b\u9762\u5169\u884c\uff1a<\/font><\/p>\n<p><font size=\"2\">\u5982\u679c\u4f60\u5728\u4e0a\u4e00\u6b65\u4e2d\u6c92\u6b63\u78ba\u9078\u53d6\u8a9e\u7cfb\uff0c\u6216\u662f\u5728\u770b\u5230\u672c\u6587\u524d\u5df2\u7d93\u5148\u5efa\u597ddatabase\u4e86\u4e5f\u6c92\u95dc\u4fc2\uff0c\u7528\u4e0b\u9762\u8a9e\u6cd5\u53ef\u4ee5\u6539\u56de\u4f86<\/font><\/p>\n<p><font size=\"2\">alter database myblog<br \/> character set utf8;<\/font><\/p>\n<p><font size=\"2\">D.\u532f\u5165\u820a\u7684 sql<\/font><\/p>\n<p><font size=\"2\">\u5230\u9019\u88cf\u70ba\u6b62mysql\u88cf\u9762\u5df2\u7d93\u6709\u4e00\u500b utf-8\u7684 database, \u53ef\u4ee5\u6e96\u5099\u5012\u8cc7\u6599\u9032\u53bb\u4e86\uff0c\u628a\u820a\u7248\u7684sql \u6587\u5b57\u6a94\u76f4\u63a5copy-paste\u6216\u4e0a\u50b3\u5230 phpmyadmin\u5373\u53ef\u3002\u6ce8\u610f\u8981\u544a\u8a34phpmyadmin\u9019\u500b\u6587\u5b57\u6a94\u662f utf-8 \u7de8\u78bc\u7684\u624d\u80fd\u6b63\u78ba\u532f\u5165\u3002<\/font><\/p>\n<p><font size=\"2\">\u6839\u64da\u6211\u7684\u7d93\u9a57\uff0c\u7e3d\u662f\u6703\u6709\u4e00\u5169\u500b\u5c0f\u5730\u65b9\u51fa\u554f\u984c\uff0c\u53ef\u80fd\u8981\u624b\u52d5\u4fee\u6539\u4e00\u4e0b\u5167\u5bb9\uff0c\u4f8b\u5982\u5c07\u67d0\u4e9b\u4e2d\u6587\u5b57\u5148\u63db\u6210\u82f1\u6587\uff0c\u7b49\u5012\u9032mysql\u5f8c\u518d\u9032wordpress \u6539\u56de\u4f86\u3002<\/font><\/p>\n<p><font size=\"2\">E.\u6539 wp-db.php \u7684\u8a2d\u5b9a<\/font><\/p>\n<p><font size=\"2\">\u524d\u9762\u66fe\u7d93\u63d0\u904e\uff0cmysql\u7684\u8a9e\u7cfb\u8a2d\u5b9a\u662f\u591a\u5c64\u6b21\u7684\uff0c\u524d\u9762\u6211\u5011\u628adatabase\u8207table\u7684\u8a9e\u7cfb\u90fd\u8a2d\u5b9a\u6b63\u78ba\uff0c\u4f46\u7a0b\u5f0f\u8207mysql\u9023\u7dda\u6642\u7684\u8a9e\u7cfb\u5247\u662f\u7531 connection \u4f86\u6c7a\u5b9a\uff0c\u9019\u90e8\u4efd\u5c31\u8981\u6539wordpress\u7684\u7a0b\u5f0f\u78bc\uff0c\u5728 wp-includeswp-db.php \u7684\u7b2c 44\u884c\u52a0\u4e0a\uff1a<br \/> $this-&gt;query(&rdquo;SET NAMES &lsquo;utf8&prime;&rdquo;);<\/font><\/p>\n<p><font size=\"2\">\u9019\u53e5\u8a71\u6703\u540c\u6642\u8a2d\u5b9a client, results, connection\u4e09\u8005\u4f7f\u7528\u7684\u8a9e\u7cfb\u70ba utf-8\u3002<\/font><\/p>\n<p><font size=\"2\">\uff0a\u6700\u5f8c\u6aa2\u67e5\u662f\u5426\u5168\u90e8\u6539\u6210 utf-8 <\/font><\/p>\n<p><font size=\"2\">show variables like \u300e%character%\u300f;<\/font><\/p>\n<p><font size=\"2\">\u6b64\u6642\u4f60\u61c9\u8a72\u6703\u770b\u5230\u5927\u90e8\u4efd\u6b04\u4f4d\u90fd\u662futf-8\u4e86\uff0c\u9664\u4e86 server \u9019\u9805\u4e4b\u5916\uff0c\u56e0\u70ba\u79df\u7528\u7684hosting\u4e3b\u96fb\u8166\uff0c\u6240\u4ee5\u6c92\u6cd5\u5152\u6539\u9019\u90e8\u4efd\uff0c\u4f46\u5e73\u5e38\u505a\u6848\u5b50\u6642\u5927\u90e8\u4efd\u90fd\u53ef\u4ee5\u76f4\u63a5\u63a7\u7ba1mysql\uff0c\u6b64\u6642\u5c31\u53ef\u4ee5\u7528 my.ini \u8a2d\u5b9a\uff1a<\/font><\/p>\n<p><font size=\"2\">[mysqld]<br \/> default-character-set=utf8<\/font><\/p>\n<p><font size=\"2\">\u544a\u8a34mysql server\u555f\u52d5\u6642\u8981\u7528 utf-8\u5373\u53ef\u3002<\/font><\/p>\n<p><font size=\"2\">\u25ce.\u7d93\u7531\u9019\u6a23\u8abf\u6821\u7684 mysql\uff0c\u9023\u7dda flash &#8211; amfphp &#8211; php &#8211; mysql \u4e5f\u5b8c\u5168\u6c92\u554f\u984c\uff0c\u53ef\u4ee5\u4e92\u50b3\u4e2d\u6587\/\u65e5\u6587\u3002<\/font><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u672c\u7528 mysql 4.0 \u800c\u540c\u6642\u8981\u5347\u7d1a\u5230 mysql 4.1-\u4e2d\u6587\u4e82\u78bc\u7684\u89e3\u6c7a\u65b9\u6cd5 \u5927\u90e8\u4efd\u4eba\u5347\u7d1awordpre [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":608,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[22],"tags":[53,55],"_links":{"self":[{"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/posts\/130"}],"collection":[{"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/comments?post=130"}],"version-history":[{"count":0,"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/posts\/130\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/media\/608"}],"wp:attachment":[{"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/media?parent=130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/categories?post=130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/tags?post=130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}