{"id":194989,"date":"2024-11-13T11:16:19","date_gmt":"2024-11-13T03:16:19","guid":{"rendered":"https:\/\/server.hk\/cnblog\/194989\/"},"modified":"2024-11-13T11:16:21","modified_gmt":"2024-11-13T03:16:21","slug":"%e7%94%a8%e4%ba%86%e4%b8%89%e5%b9%b4mysql%ef%bc%8c%e9%82%84%e4%b8%8d%e7%9f%a5%e9%81%93server%e5%b1%a4%e5%92%8c%e5%bc%95%e6%93%8e%e5%b1%a4%e6%98%af%e5%a6%82%e4%bd%95%e4%ba%a4%e4%ba%92%e7%9a%84%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/194989\/","title":{"rendered":"\u7528\u4e86\u4e09\u5e74MySQL\uff0c\u9084\u4e0d\u77e5\u9053Server\u5c64\u548c\u5f15\u64ce\u5c64\u662f\u5982\u4f55\u4ea4\u4e92\u7684\uff1f"},"content":{"rendered":"<h1 id=\"%e7%94%a8%e4%ba%86%e4%b8%89%e5%b9%b4mysql%ef%bc%8c%e9%82%84%e4%b8%8d%e7%9f%a5%e9%81%93server%e5%b1%a4%e5%92%8c%e5%bc%95%e6%93%8e%e5%b1%a4%e6%98%af%e5%a6%82%e4%bd%95%e4%ba%a4%e4%ba%92%e7%9a%84%ef%bc%9f-ifAZZqyUbX\">\u7528\u4e86\u4e09\u5e74MySQL\uff0c\u9084\u4e0d\u77e5\u9053Server\u5c64\u548c\u5f15\u64ce\u5c64\u662f\u5982\u4f55\u4ea4\u4e92\u7684\uff1f<\/h1>\n<p>\u5728\u4f7f\u7528MySQL\u7684\u904e\u7a0b\u4e2d\uff0c\u8a31\u591a\u958b\u767c\u8005\u53ef\u80fd\u6703\u5c0d\u5176\u5167\u90e8\u67b6\u69cb\u611f\u5230\u56f0\u60d1\uff0c\u7279\u5225\u662fServer\u5c64\u548c\u5f15\u64ce\u5c64\u4e4b\u9593\u7684\u4ea4\u4e92\u3002\u9019\u7bc7\u6587\u7ae0\u5c07\u6df1\u5165\u63a2\u8a0e\u9019\u5169\u500b\u5c64\u6b21\u7684\u529f\u80fd\u53ca\u5176\u5982\u4f55\u5354\u540c\u5de5\u4f5c\uff0c\u4ee5\u4fbf\u5e6b\u52a9\u8b80\u8005\u66f4\u597d\u5730\u7406\u89e3MySQL\u7684\u904b\u4f5c\u539f\u7406\u3002<\/p>\n<h2 id=\"mysql%e7%9a%84%e6%9e%b6%e6%a7%8b%e6%a6%82%e8%bf%b0-ifAZZqyUbX\">MySQL\u7684\u67b6\u69cb\u6982\u8ff0<\/h2>\n<p>MySQL\u662f\u4e00\u500b\u95dc\u806f\u5f0f\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\uff08RDBMS\uff09\uff0c\u5176\u67b6\u69cb\u4e3b\u8981\u5206\u70ba\u5169\u500b\u5c64\u6b21\uff1aServer\u5c64\u548c\u5f15\u64ce\u5c64\u3002Server\u5c64\u8ca0\u8cac\u8655\u7406\u7528\u6236\u8acb\u6c42\u3001\u67e5\u8a62\u89e3\u6790\u3001\u512a\u5316\u548c\u57f7\u884c\uff0c\u800c\u5f15\u64ce\u5c64\u5247\u8ca0\u8cac\u6578\u64da\u7684\u5b58\u5132\u548c\u6aa2\u7d22\u3002\u9019\u5169\u500b\u5c64\u6b21\u7684\u5354\u4f5c\u662fMySQL\u9ad8\u6548\u904b\u884c\u7684\u95dc\u9375\u3002<\/p>\n<h2 id=\"server%e5%b1%a4%e7%9a%84%e5%8a%9f%e8%83%bd-ifAZZqyUbX\">Server\u5c64\u7684\u529f\u80fd<\/h2>\n<p>Server\u5c64\u662fMySQL\u7684\u6838\u5fc3\uff0c\u4e3b\u8981\u8ca0\u8cac\u4ee5\u4e0b\u5e7e\u500b\u65b9\u9762\uff1a<\/p>\n<ul>\n<li><strong>\u7528\u6236\u7ba1\u7406\uff1a<\/strong>Server\u5c64\u8655\u7406\u7528\u6236\u7684\u8eab\u4efd\u9a57\u8b49\u548c\u6b0a\u9650\u7ba1\u7406\uff0c\u78ba\u4fdd\u6578\u64da\u7684\u5b89\u5168\u6027\u3002<\/li>\n<li><strong>\u67e5\u8a62\u89e3\u6790\uff1a<\/strong>\u7576\u7528\u6236\u767c\u9001SQL\u67e5\u8a62\u6642\uff0cServer\u5c64\u6703\u89e3\u6790\u9019\u4e9b\u67e5\u8a62\uff0c\u5c07\u5176\u8f49\u63db\u70ba\u5167\u90e8\u53ef\u7406\u89e3\u7684\u683c\u5f0f\u3002<\/li>\n<li><strong>\u67e5\u8a62\u512a\u5316\uff1a<\/strong>Server\u5c64\u6703\u6839\u64da\u6578\u64da\u5eab\u7684\u7d71\u8a08\u4fe1\u606f\uff0c\u9078\u64c7\u6700\u4f73\u7684\u57f7\u884c\u8a08\u5283\uff0c\u4ee5\u63d0\u9ad8\u67e5\u8a62\u6548\u7387\u3002<\/li>\n<li><strong>\u7d50\u679c\u8fd4\u56de\uff1a<\/strong>\u57f7\u884c\u5b8c\u67e5\u8a62\u5f8c\uff0cServer\u5c64\u6703\u5c07\u7d50\u679c\u8fd4\u56de\u7d66\u7528\u6236\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%bc%95%e6%93%8e%e5%b1%a4%e7%9a%84%e5%8a%9f%e8%83%bd-ifAZZqyUbX\">\u5f15\u64ce\u5c64\u7684\u529f\u80fd<\/h2>\n<p>\u5f15\u64ce\u5c64\u662fMySQL\u7684\u6578\u64da\u5b58\u5132\u548c\u6aa2\u7d22\u90e8\u5206\uff0c\u4e3b\u8981\u5305\u62ec\u4ee5\u4e0b\u5e7e\u500b\u5f15\u64ce\uff1a<\/p>\n<ul>\n<li><strong>InnoDB\uff1a<\/strong>\u652f\u6301\u4e8b\u52d9\u3001\u884c\u7d1a\u9396\u548c\u5916\u9375\uff0c\u9069\u5408\u9700\u8981\u9ad8\u4e26\u767c\u548c\u6578\u64da\u5b8c\u6574\u6027\u7684\u61c9\u7528\u3002<\/li>\n<li><strong>MyISAM\uff1a<\/strong>\u4e0d\u652f\u6301\u4e8b\u52d9\uff0c\u4f46\u5728\u8b80\u53d6\u6027\u80fd\u4e0a\u8868\u73fe\u512a\u7570\uff0c\u9069\u5408\u4ee5\u8b80\u53d6\u70ba\u4e3b\u7684\u61c9\u7528\u3002<\/li>\n<li><strong>Memory\uff1a<\/strong>\u5c07\u6578\u64da\u5b58\u5132\u5728\u5167\u5b58\u4e2d\uff0c\u901f\u5ea6\u5feb\uff0c\u4f46\u6578\u64da\u4e0d\u6301\u4e45\u5316\uff0c\u9069\u5408\u81e8\u6642\u6578\u64da\u5b58\u5132\u3002<\/li>\n<\/ul>\n<h2 id=\"server%e5%b1%a4%e8%88%87%e5%bc%95%e6%93%8e%e5%b1%a4%e7%9a%84%e4%ba%a4%e4%ba%92-ifAZZqyUbX\">Server\u5c64\u8207\u5f15\u64ce\u5c64\u7684\u4ea4\u4e92<\/h2>\n<p>Server\u5c64\u548c\u5f15\u64ce\u5c64\u4e4b\u9593\u7684\u4ea4\u4e92\u662f\u901a\u904e\u4e00\u7d44API\u4f86\u5be6\u73fe\u7684\u3002\u7576\u7528\u6236\u767c\u9001\u4e00\u500bSQL\u67e5\u8a62\u6642\uff0cServer\u5c64\u9996\u5148\u89e3\u6790\u8a72\u67e5\u8a62\uff0c\u7136\u5f8c\u6839\u64da\u67e5\u8a62\u7684\u985e\u578b\u548c\u6240\u6d89\u53ca\u7684\u8868\uff0c\u9078\u64c7\u5408\u9069\u7684\u5b58\u5132\u5f15\u64ce\u4f86\u57f7\u884c\u8a72\u67e5\u8a62\u3002<\/p>\n<p>\u4f8b\u5982\uff0c\u7576\u57f7\u884c\u4e00\u500b\u63d2\u5165\u64cd\u4f5c\u6642\uff0cServer\u5c64\u6703\u5c07\u6578\u64da\u50b3\u905e\u7d66\u9078\u5b9a\u7684\u5f15\u64ce\uff08\u5982InnoDB\u6216MyISAM\uff09\uff0c\u5f15\u64ce\u5c64\u5247\u8ca0\u8cac\u5c07\u6578\u64da\u5beb\u5165\u78c1\u789f\u6216\u5167\u5b58\u4e2d\u3002\u9019\u4e00\u904e\u7a0b\u4e2d\uff0cServer\u5c64\u6703\u6839\u64da\u5f15\u64ce\u7684\u7279\u6027\u4f86\u8abf\u6574\u67e5\u8a62\u7684\u57f7\u884c\u65b9\u5f0f\uff0c\u4f8b\u5982\u5728\u4f7f\u7528InnoDB\u6642\uff0cServer\u5c64\u6703\u8003\u616e\u4e8b\u52d9\u7684ACID\u7279\u6027\u3002<\/p>\n<h3 id=\"%e7%a4%ba%e4%be%8b%ef%bc%9a%e6%9f%a5%e8%a9%a2%e7%9a%84%e5%9f%b7%e8%a1%8c%e9%81%8e%e7%a8%8b-ifAZZqyUbX\">\u793a\u4f8b\uff1a\u67e5\u8a62\u7684\u57f7\u884c\u904e\u7a0b<\/h3>\n<pre><code>SELECT * FROM users WHERE id = 1;<\/code><\/pre>\n<p>\u5728\u57f7\u884c\u4e0a\u8ff0\u67e5\u8a62\u6642\uff0c\u904e\u7a0b\u5982\u4e0b\uff1a<\/p>\n<ol>\n<li>Server\u5c64\u63a5\u6536\u5230\u67e5\u8a62\u8acb\u6c42\u3002<\/li>\n<li>\u89e3\u6790\u67e5\u8a62\u4e26\u78ba\u5b9a\u4f7f\u7528\u7684\u5f15\u64ce\uff08\u5047\u8a2d\u70baInnoDB\uff09\u3002<\/li>\n<li>Server\u5c64\u5411InnoDB\u5f15\u64ce\u767c\u9001\u8acb\u6c42\uff0c\u8981\u6c42\u6aa2\u7d22id\u70ba1\u7684\u7528\u6236\u6578\u64da\u3002<\/li>\n<li>InnoDB\u5f15\u64ce\u5f9e\u6578\u64da\u9801\u4e2d\u6aa2\u7d22\u6578\u64da\u4e26\u8fd4\u56de\u7d66Server\u5c64\u3002<\/li>\n<li>Server\u5c64\u5c07\u7d50\u679c\u8fd4\u56de\u7d66\u7528\u6236\u3002<\/li>\n<\/ol>\n<h2 id=\"%e7%b5%90%e8%ab%96-ifAZZqyUbX\">\u7d50\u8ad6<\/h2>\n<p>\u7406\u89e3MySQL\u7684Server\u5c64\u548c\u5f15\u64ce\u5c64\u4e4b\u9593\u7684\u4ea4\u4e92\u5c0d\u65bc\u958b\u767c\u8005\u4f86\u8aaa\u81f3\u95dc\u91cd\u8981\u3002\u9019\u4e0d\u50c5\u6709\u52a9\u65bc\u512a\u5316\u67e5\u8a62\u6027\u80fd\uff0c\u9084\u80fd\u63d0\u9ad8\u6578\u64da\u5eab\u7684\u6574\u9ad4\u6548\u7387\u3002\u7121\u8ad6\u662f\u9078\u64c7\u5408\u9069\u7684\u5b58\u5132\u5f15\u64ce\uff0c\u9084\u662f\u8abf\u6574\u67e5\u8a62\u7684\u57f7\u884c\u65b9\u5f0f\uff0c\u5c0d\u65bc\u63d0\u5347\u61c9\u7528\u7684\u6027\u80fd\u90fd\u6709\u8457\u91cd\u8981\u7684\u5f71\u97ff\u3002<\/p>\n<p>\u5982\u679c\u60a8\u6b63\u5728\u5c0b\u627e\u9ad8\u6548\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\uff0cServer.HK \u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\uff0c\u9069\u5408\u4e0d\u540c\u9700\u6c42\u7684\u7528\u6236\u3002\u7121\u8ad6\u662f <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u9084\u662f\u5176\u4ed6\u985e\u578b\u7684 <a href=\"https:\/\/server.hk\">\u4f3a\u670d\u5668<\/a>\uff0c\u6211\u5011\u90fd\u80fd\u70ba\u60a8\u63d0\u4f9b\u7a69\u5b9a\u53ef\u9760\u7684\u670d\u52d9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3MySQL\u7684Server\u5c64\u8207\u5f15\u64ce\u5c64\u4ea4\u4e92\uff0c\u63ed\u958b\u6578\u64da\u5eab\u904b\u4f5c\u7684\u795e\u79d8\u9762\u7d17\uff0c\u63d0\u5347\u4f60\u7684\u6578\u64da\u7ba1\u7406\u6280\u80fd\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-194989","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/194989","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"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=194989"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/194989\/revisions"}],"predecessor-version":[{"id":194990,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/194989\/revisions\/194990"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=194989"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=194989"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=194989"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}