{"id":55757,"date":"2024-10-10T05:54:16","date_gmt":"2024-10-09T21:54:16","guid":{"rendered":"https:\/\/server.hk\/cnblog\/55757\/"},"modified":"2024-10-10T05:54:16","modified_gmt":"2024-10-09T21:54:16","slug":"wordpress-%e6%95%99%e7%a8%8b%ef%bc%9amysql-%e5%ad%98%e5%84%b2%e5%bc%95%e6%93%8e-%e5%a6%82%e4%bd%95%e5%b0%87-myisam-%e8%bd%89%e6%8f%9b%e7%82%ba-innodb","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/55757\/","title":{"rendered":"WordPress \u6559\u7a0b\uff1aMySQL \u5b58\u5132\u5f15\u64ce \u2013 \u5982\u4f55\u5c07 MyISAM \u8f49\u63db\u70ba InnoDB"},"content":{"rendered":"<h1 id=\"wordpress-%e6%95%99%e7%a8%8b%ef%bc%9amysql-%e5%ad%98%e5%84%b2%e5%bc%95%e6%93%8e-%e5%a6%82%e4%bd%95%e5%b0%87-myisam-%e8%bd%89%e6%8f%9b%e7%82%ba-innodb-BTwWgnWtho\">WordPress \u6559\u7a0b\uff1aMySQL \u5b58\u5132\u5f15\u64ce \u2013 \u5982\u4f55\u5c07 MyISAM \u8f49\u63db\u70ba InnoDB<\/h1>\n<p>\u5728\u4f7f\u7528 WordPress \u6642\uff0c\u9078\u64c7\u5408\u9069\u7684 MySQL \u5b58\u5132\u5f15\u64ce\u5c0d\u65bc\u7db2\u7ad9\u7684\u6027\u80fd\u548c\u7a69\u5b9a\u6027\u81f3\u95dc\u91cd\u8981\u3002MyISAM \u548c InnoDB \u662f\u5169\u7a2e\u5e38\u898b\u7684\u5b58\u5132\u5f15\u64ce\uff0c\u5404\u6709\u5176\u7279\u9ede\u548c\u512a\u7f3a\u9ede\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u5982\u4f55\u5c07 MyISAM \u8f49\u63db\u70ba InnoDB\uff0c\u4e26\u63a2\u8a0e\u9019\u4e00\u904e\u7a0b\u4e2d\u7684\u6ce8\u610f\u4e8b\u9805\u3002<\/p>\n<h2 id=\"myisam-%e8%88%87-innodb-%e7%9a%84%e6%af%94%e8%bc%83-BTwWgnWtho\">MyISAM \u8207 InnoDB \u7684\u6bd4\u8f03<\/h2>\n<p>\u5728\u6df1\u5165\u8f49\u63db\u904e\u7a0b\u4e4b\u524d\uff0c\u4e86\u89e3 MyISAM \u548c InnoDB \u7684\u4e3b\u8981\u5340\u5225\u662f\u975e\u5e38\u91cd\u8981\u7684\uff1a<\/p>\n<ul>\n<li><strong>\u4e8b\u52d9\u652f\u6301\uff1a<\/strong>InnoDB \u652f\u6301\u4e8b\u52d9\uff0c\u9019\u610f\u5473\u8457\u5b83\u80fd\u5920\u78ba\u4fdd\u6578\u64da\u7684\u4e00\u81f4\u6027\u548c\u5b8c\u6574\u6027\uff0c\u800c MyISAM \u5247\u4e0d\u652f\u6301\u4e8b\u52d9\u3002<\/li>\n<li><strong>\u5916\u9375\u652f\u6301\uff1a<\/strong>InnoDB \u652f\u6301\u5916\u9375\u7d04\u675f\uff0c\u9019\u5c0d\u65bc\u6578\u64da\u7684\u95dc\u806f\u6027\u7ba1\u7406\u975e\u5e38\u91cd\u8981\uff0c\u800c MyISAM \u4e0d\u652f\u6301\u3002<\/li>\n<li><strong>\u9396\u5b9a\u6a5f\u5236\uff1a<\/strong>InnoDB \u4f7f\u7528\u884c\u7d1a\u9396\u5b9a\uff0c\u9019\u4f7f\u5f97\u591a\u7528\u6236\u540c\u6642\u8a2a\u554f\u6578\u64da\u6642\u6027\u80fd\u66f4\u4f73\uff1b\u800c MyISAM \u5247\u4f7f\u7528\u8868\u7d1a\u9396\u5b9a\uff0c\u53ef\u80fd\u5c0e\u81f4\u6027\u80fd\u74f6\u9838\u3002<\/li>\n<li><strong>\u5d29\u6f70\u6062\u5fa9\uff1a<\/strong>InnoDB \u63d0\u4f9b\u81ea\u52d5\u5d29\u6f70\u6062\u5fa9\u529f\u80fd\uff0c\u80fd\u5920\u5728\u7cfb\u7d71\u6545\u969c\u5f8c\u81ea\u52d5\u4fee\u5fa9\u6578\u64da\uff0c\u800c MyISAM \u5247\u9700\u8981\u624b\u52d5\u4fee\u5fa9\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%82%ba%e4%bb%80%e9%ba%bc%e8%a6%81%e8%bd%89%e6%8f%9b%e7%82%ba-innodb%ef%bc%9f-BTwWgnWtho\">\u70ba\u4ec0\u9ebc\u8981\u8f49\u63db\u70ba InnoDB\uff1f<\/h2>\n<p>\u7531\u65bc InnoDB \u63d0\u4f9b\u4e86\u66f4\u597d\u7684\u6578\u64da\u5b8c\u6574\u6027\u548c\u6027\u80fd\uff0c\u8a31\u591a WordPress \u7528\u6236\u9078\u64c7\u5c07\u5176\u6578\u64da\u5eab\u7684\u5b58\u5132\u5f15\u64ce\u5f9e MyISAM \u8f49\u63db\u70ba InnoDB\u3002\u9019\u5c0d\u65bc\u9700\u8981\u9ad8\u4e26\u767c\u8a2a\u554f\u7684\u7db2\u7ad9\u5c24\u70ba\u91cd\u8981\uff0c\u4f8b\u5982\u96fb\u5b50\u5546\u52d9\u7db2\u7ad9\u6216\u793e\u4ea4\u5a92\u9ad4\u5e73\u53f0\u3002<\/p>\n<h2 id=\"%e5%a6%82%e4%bd%95%e5%b0%87-myisam-%e8%bd%89%e6%8f%9b%e7%82%ba-innodb-BTwWgnWtho\">\u5982\u4f55\u5c07 MyISAM \u8f49\u63db\u70ba InnoDB<\/h2>\n<p>\u4ee5\u4e0b\u662f\u5c07 MyISAM \u8f49\u63db\u70ba InnoDB \u7684\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-1%ef%bc%9a%e5%82%99%e4%bb%bd%e6%95%b8%e6%93%9a%e5%ba%ab-BTwWgnWtho\">\u6b65\u9a5f 1\uff1a\u5099\u4efd\u6578\u64da\u5eab<\/h3>\n<pre><code>mysqldump -u username -p database_name &gt; backup.sql<\/code><\/pre>\n<p>\u5728\u9032\u884c\u4efb\u4f55\u66f4\u6539\u4e4b\u524d\uff0c\u52d9\u5fc5\u5099\u4efd\u6578\u64da\u5eab\uff0c\u4ee5\u9632\u6b62\u6578\u64da\u4e1f\u5931\u3002<\/p>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-2%ef%bc%9a%e6%aa%a2%e6%9f%a5%e7%95%b6%e5%89%8d%e5%ad%98%e5%84%b2%e5%bc%95%e6%93%8e-BTwWgnWtho\">\u6b65\u9a5f 2\uff1a\u6aa2\u67e5\u7576\u524d\u5b58\u5132\u5f15\u64ce<\/h3>\n<p>\u4f7f\u7528\u4ee5\u4e0b SQL \u67e5\u8a62\u6aa2\u67e5\u7576\u524d\u7684\u5b58\u5132\u5f15\u64ce\uff1a<\/p>\n<pre><code>SELECT table_name, engine FROM information_schema.tables WHERE table_schema = 'database_name';<\/code><\/pre>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-3%ef%bc%9a%e8%bd%89%e6%8f%9b%e5%ad%98%e5%84%b2%e5%bc%95%e6%93%8e-BTwWgnWtho\">\u6b65\u9a5f 3\uff1a\u8f49\u63db\u5b58\u5132\u5f15\u64ce<\/h3>\n<p>\u4f7f\u7528\u4ee5\u4e0b SQL \u8a9e\u53e5\u5c07 MyISAM \u8868\u8f49\u63db\u70ba InnoDB\uff1a<\/p>\n<pre><code>ALTER TABLE table_name ENGINE=InnoDB;<\/code><\/pre>\n<p>\u5c0d\u65bc\u591a\u500b\u8868\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u8a9e\u53e5\uff1a<\/p>\n<pre><code>ALTER TABLE table1 ENGINE=InnoDB, table2 ENGINE=InnoDB;<\/code><\/pre>\n<h3 id=\"%e6%ad%a5%e9%a9%9f-4%ef%bc%9a%e9%a9%97%e8%ad%89%e8%bd%89%e6%8f%9b-BTwWgnWtho\">\u6b65\u9a5f 4\uff1a\u9a57\u8b49\u8f49\u63db<\/h3>\n<p>\u518d\u6b21\u904b\u884c\u6aa2\u67e5\u5b58\u5132\u5f15\u64ce\u7684 SQL \u67e5\u8a62\uff0c\u4ee5\u78ba\u4fdd\u6240\u6709\u8868\u90fd\u5df2\u6210\u529f\u8f49\u63db\u70ba InnoDB\u3002<\/p>\n<h2 id=\"%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a0%85-BTwWgnWtho\">\u6ce8\u610f\u4e8b\u9805<\/h2>\n<ul>\n<li>\u5728\u8f49\u63db\u904e\u7a0b\u4e2d\uff0c\u8acb\u78ba\u4fdd\u6c92\u6709\u5176\u4ed6\u7528\u6236\u6b63\u5728\u8a2a\u554f\u6578\u64da\u5eab\uff0c\u4ee5\u907f\u514d\u6578\u64da\u640d\u58de\u3002<\/li>\n<li>\u8f49\u63db\u5f8c\uff0c\u5efa\u8b70\u6aa2\u67e5\u61c9\u7528\u7a0b\u5e8f\u7684\u6027\u80fd\uff0c\u78ba\u4fdd\u4e00\u5207\u6b63\u5e38\u904b\u884c\u3002<\/li>\n<li>\u5982\u679c\u4f7f\u7528\u4e86\u5916\u9375\uff0c\u8acb\u78ba\u4fdd\u76f8\u95dc\u8868\u7684\u7d50\u69cb\u6b63\u78ba\uff0c\u4ee5\u907f\u514d\u51fa\u73fe\u932f\u8aa4\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-BTwWgnWtho\">\u7e3d\u7d50<\/h2>\n<p>\u5c07 MyISAM \u8f49\u63db\u70ba InnoDB \u662f\u63d0\u5347 WordPress \u6578\u64da\u5eab\u6027\u80fd\u548c\u7a69\u5b9a\u6027\u7684\u6709\u6548\u65b9\u6cd5\u3002\u901a\u904e\u9075\u5faa\u4e0a\u8ff0\u6b65\u9a5f\uff0c\u60a8\u53ef\u4ee5\u8f15\u9b06\u5b8c\u6210\u9019\u4e00\u904e\u7a0b\uff0c\u4e26\u4eab\u53d7 InnoDB \u5e36\u4f86\u7684\u512a\u52e2\u3002\u5982\u679c\u60a8\u6b63\u5728\u5c0b\u627e\u53ef\u9760\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2f VPS<\/a> \u89e3\u6c7a\u65b9\u6848\uff0cServer.HK \u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\uff0c\u6eff\u8db3\u60a8\u7684\u9700\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b78\u7fd2\u5982\u4f55\u5728 WordPress \u4e2d\u5c07 MyISAM \u5b58\u5132\u5f15\u64ce\u8f49\u63db\u70ba InnoDB\uff0c\u63d0\u5347\u6578\u64da\u5b89\u5168\u6027\u548c\u6027\u80fd\u7684\u5be6\u7528\u6559\u7a0b\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-55757","post","type-post","status-publish","format-standard","hentry","category-4925"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/55757","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=55757"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/55757\/revisions"}],"predecessor-version":[{"id":55758,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/55757\/revisions\/55758"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=55757"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=55757"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=55757"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}