{"id":166781,"date":"2024-11-05T19:29:20","date_gmt":"2024-11-05T11:29:20","guid":{"rendered":"https:\/\/server.hk\/cnblog\/166781\/"},"modified":"2024-11-05T19:29:21","modified_gmt":"2024-11-05T11:29:21","slug":"%e4%ba%86%ef%bc%8c%e6%87%89%e8%a9%b2%e6%80%8e%e9%ba%bc%e8%be%a6%ef%bc%9f%e6%95%b8%e6%93%9a%e5%ba%ab%e6%9c%8d%e5%8b%99%e5%95%9f%e5%8b%95%e5%a4%b1%e6%95%97%e6%80%8e%e9%ba%bc%e8%be%a6%ef%bc%9f-%e6%95%b8","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/166781\/","title":{"rendered":"\u4e86\uff0c\u61c9\u8a72\u600e\u9ebc\u8fa6\uff1f\u6578\u64da\u5eab\u670d\u52d9\u555f\u52d5\u5931\u6557\u600e\u9ebc\u8fa6\uff1f (\u6578\u64da\u5eab\u670d\u52d9\u555f\u52d5\u4e0d)"},"content":{"rendered":"<h1 id=\"%e4%ba%86%ef%bc%8c%e6%87%89%e8%a9%b2%e6%80%8e%e9%ba%bc%e8%be%a6%ef%bc%9f%e6%95%b8%e6%93%9a%e5%ba%ab%e6%9c%8d%e5%8b%99%e5%95%9f%e5%8b%95%e5%a4%b1%e6%95%97%e6%80%8e%e9%ba%bc%e8%be%a6%ef%bc%9f-pJCfzxpfTn\">\u4e86\uff0c\u61c9\u8a72\u600e\u9ebc\u8fa6\uff1f\u6578\u64da\u5eab\u670d\u52d9\u555f\u52d5\u5931\u6557\u600e\u9ebc\u8fa6\uff1f<\/h1>\n<p>\u5728\u73fe\u4eca\u7684\u6578\u64da\u9a45\u52d5\u4e16\u754c\u4e2d\uff0c\u6578\u64da\u5eab\u662f\u4f01\u696d\u904b\u71df\u7684\u6838\u5fc3\u7d44\u4ef6\u4e4b\u4e00\u3002\u7136\u800c\uff0c\u6578\u64da\u5eab\u670d\u52d9\u7684\u555f\u52d5\u5931\u6557\u53ef\u80fd\u6703\u5c0e\u81f4\u696d\u52d9\u4e2d\u65b7\uff0c\u5f71\u97ff\u6578\u64da\u7684\u53ef\u7528\u6027\u548c\u5b8c\u6574\u6027\u3002\u672c\u6587\u5c07\u63a2\u8a0e\u6578\u64da\u5eab\u670d\u52d9\u555f\u52d5\u5931\u6557\u7684\u5e38\u898b\u539f\u56e0\u53ca\u5176\u89e3\u6c7a\u65b9\u6848\uff0c\u5e6b\u52a9\u7528\u6236\u5feb\u901f\u6062\u5fa9\u670d\u52d9\u3002<\/p>\n<h2 id=\"%e5%b8%b8%e8%a6%8b%e7%9a%84%e6%95%b8%e6%93%9a%e5%ba%ab%e5%95%9f%e5%8b%95%e5%a4%b1%e6%95%97%e5%8e%9f%e5%9b%a0-pJCfzxpfTn\">\u5e38\u898b\u7684\u6578\u64da\u5eab\u555f\u52d5\u5931\u6557\u539f\u56e0<\/h2>\n<p>\u6578\u64da\u5eab\u670d\u52d9\u555f\u52d5\u5931\u6557\u7684\u539f\u56e0\u591a\u7a2e\u591a\u6a23\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u898b\u7684\u60c5\u6cc1\uff1a<\/p>\n<ul>\n<li><strong>\u914d\u7f6e\u6587\u4ef6\u932f\u8aa4\uff1a<\/strong>\u6578\u64da\u5eab\u7684\u914d\u7f6e\u6587\u4ef6\uff08\u5982my.cnf\u6216postgresql.conf\uff09\u4e2d\u53ef\u80fd\u5b58\u5728\u932f\u8aa4\u7684\u8a2d\u7f6e\uff0c\u5c0e\u81f4\u670d\u52d9\u7121\u6cd5\u555f\u52d5\u3002<\/li>\n<li><strong>\u7aef\u53e3\u885d\u7a81\uff1a<\/strong>\u5982\u679c\u6578\u64da\u5eab\u670d\u52d9\u6240\u9700\u7684\u7aef\u53e3\u5df2\u88ab\u5176\u4ed6\u61c9\u7528\u7a0b\u5e8f\u4f54\u7528\uff0c\u5247\u6703\u5c0e\u81f4\u555f\u52d5\u5931\u6557\u3002<\/li>\n<li><strong>\u78c1\u789f\u7a7a\u9593\u4e0d\u8db3\uff1a<\/strong>\u6578\u64da\u5eab\u9700\u8981\u8db3\u5920\u7684\u78c1\u789f\u7a7a\u9593\u4f86\u555f\u52d5\u548c\u904b\u884c\uff0c\u5982\u679c\u78c1\u789f\u7a7a\u9593\u4e0d\u8db3\uff0c\u5247\u6703\u51fa\u73fe\u555f\u52d5\u5931\u6557\u7684\u60c5\u6cc1\u3002<\/li>\n<li><strong>\u6578\u64da\u640d\u58de\uff1a<\/strong>\u6578\u64da\u5eab\u6587\u4ef6\u640d\u58de\u6216\u4e1f\u5931\u4e5f\u6703\u5c0e\u81f4\u670d\u52d9\u7121\u6cd5\u555f\u52d5\u3002<\/li>\n<li><strong>\u6b0a\u9650\u554f\u984c\uff1a<\/strong>\u6578\u64da\u5eab\u670d\u52d9\u53ef\u80fd\u6c92\u6709\u8db3\u5920\u7684\u6b0a\u9650\u4f86\u8a2a\u554f\u6240\u9700\u7684\u6587\u4ef6\u6216\u76ee\u9304\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%a6%82%e4%bd%95%e6%8e%92%e6%9f%a5%e6%95%b8%e6%93%9a%e5%ba%ab%e5%95%9f%e5%8b%95%e5%a4%b1%e6%95%97%e5%95%8f%e9%a1%8c-pJCfzxpfTn\">\u5982\u4f55\u6392\u67e5\u6578\u64da\u5eab\u555f\u52d5\u5931\u6557\u554f\u984c<\/h2>\n<p>\u7576\u6578\u64da\u5eab\u670d\u52d9\u7121\u6cd5\u555f\u52d5\u6642\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9a5f\u9032\u884c\u6392\u67e5\uff1a<\/p>\n<h3 id=\"1-%e6%aa%a2%e6%9f%a5%e6%97%a5%e8%aa%8c%e6%96%87%e4%bb%b6-pJCfzxpfTn\">1. \u6aa2\u67e5\u65e5\u8a8c\u6587\u4ef6<\/h3>\n<p>\u6578\u64da\u5eab\u901a\u5e38\u6703\u751f\u6210\u65e5\u8a8c\u6587\u4ef6\uff0c\u8a18\u9304\u555f\u52d5\u904e\u7a0b\u4e2d\u7684\u932f\u8aa4\u4fe1\u606f\u3002\u6aa2\u67e5\u9019\u4e9b\u65e5\u8a8c\u6587\u4ef6\u53ef\u4ee5\u5e6b\u52a9\u8b58\u5225\u554f\u984c\u6240\u5728\u3002\u4f8b\u5982\uff0c\u5c0d\u65bcMySQL\uff0c\u53ef\u4ee5\u67e5\u770b\u4ee5\u4e0b\u65e5\u8a8c\uff1a<\/p>\n<pre><code>\/var\/log\/mysql\/error.log<\/code><\/pre>\n<h3 id=\"2-%e9%a9%97%e8%ad%89%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6-pJCfzxpfTn\">2. \u9a57\u8b49\u914d\u7f6e\u6587\u4ef6<\/h3>\n<p>\u6aa2\u67e5\u6578\u64da\u5eab\u7684\u914d\u7f6e\u6587\u4ef6\uff0c\u78ba\u4fdd\u6240\u6709\u8a2d\u7f6e\u6b63\u78ba\u7121\u8aa4\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6aa2\u67e5MySQL\u914d\u7f6e\u6587\u4ef6\u7684\u8a9e\u6cd5\uff1a<\/p>\n<pre><code>mysqld --verbose --help<\/code><\/pre>\n<h3 id=\"3-%e6%aa%a2%e6%9f%a5%e7%ab%af%e5%8f%a3%e4%bd%bf%e7%94%a8%e6%83%85%e6%b3%81-pJCfzxpfTn\">3. \u6aa2\u67e5\u7aef\u53e3\u4f7f\u7528\u60c5\u6cc1<\/h3>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6aa2\u67e5\u7aef\u53e3\u662f\u5426\u88ab\u5176\u4ed6\u9032\u7a0b\u4f54\u7528\uff1a<\/p>\n<pre><code>netstat -tuln | grep 3306<\/code><\/pre>\n<p>\u5982\u679c\u767c\u73fe\u7aef\u53e3\u88ab\u4f54\u7528\uff0c\u53ef\u4ee5\u8003\u616e\u66f4\u6539\u6578\u64da\u5eab\u7684\u7aef\u53e3\u8a2d\u7f6e\u3002<\/p>\n<h3 id=\"4-%e7%a2%ba%e8%aa%8d%e7%a3%81%e7%a2%9f%e7%a9%ba%e9%96%93-pJCfzxpfTn\">4. \u78ba\u8a8d\u78c1\u789f\u7a7a\u9593<\/h3>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6aa2\u67e5\u78c1\u789f\u7a7a\u9593\uff1a<\/p>\n<pre><code>df -h<\/code><\/pre>\n<p>\u5982\u679c\u767c\u73fe\u7a7a\u9593\u4e0d\u8db3\uff0c\u5247\u9700\u8981\u6e05\u7406\u4e0d\u5fc5\u8981\u7684\u6587\u4ef6\u6216\u64f4\u5c55\u78c1\u789f\u5bb9\u91cf\u3002<\/p>\n<h3 id=\"5-%e6%aa%a2%e6%9f%a5%e6%ac%8a%e9%99%90%e8%a8%ad%e7%bd%ae-pJCfzxpfTn\">5. \u6aa2\u67e5\u6b0a\u9650\u8a2d\u7f6e<\/h3>\n<p>\u78ba\u4fdd\u6578\u64da\u5eab\u670d\u52d9\u64c1\u6709\u8a2a\u554f\u6240\u9700\u6587\u4ef6\u548c\u76ee\u9304\u7684\u6b0a\u9650\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6aa2\u67e5\u6b0a\u9650\uff1a<\/p>\n<pre><code>ls -l \/var\/lib\/mysql<\/code><\/pre>\n<h2 id=\"%e8%a7%a3%e6%b1%ba%e6%96%b9%e6%a1%88-pJCfzxpfTn\">\u89e3\u6c7a\u65b9\u6848<\/h2>\n<p>\u6839\u64da\u6392\u67e5\u7d50\u679c\uff0c\u91dd\u5c0d\u4e0d\u540c\u7684\u554f\u984c\u53ef\u4ee5\u63a1\u53d6\u76f8\u61c9\u7684\u89e3\u6c7a\u65b9\u6848\uff1a<\/p>\n<ul>\n<li>\u5982\u679c\u662f\u914d\u7f6e\u6587\u4ef6\u932f\u8aa4\uff0c\u8acb\u4fee\u6b63\u914d\u7f6e\u4e26\u91cd\u555f\u6578\u64da\u5eab\u670d\u52d9\u3002<\/li>\n<li>\u5982\u679c\u662f\u7aef\u53e3\u885d\u7a81\uff0c\u8acb\u66f4\u6539\u6578\u64da\u5eab\u7684\u7aef\u53e3\u8a2d\u7f6e\u6216\u505c\u6b62\u4f54\u7528\u8a72\u7aef\u53e3\u7684\u61c9\u7528\u7a0b\u5e8f\u3002<\/li>\n<li>\u5982\u679c\u78c1\u789f\u7a7a\u9593\u4e0d\u8db3\uff0c\u8acb\u6e05\u7406\u4e0d\u5fc5\u8981\u7684\u6587\u4ef6\u6216\u64f4\u5c55\u78c1\u789f\u5bb9\u91cf\u3002<\/li>\n<li>\u5982\u679c\u6578\u64da\u640d\u58de\uff0c\u8003\u616e\u5f9e\u5099\u4efd\u4e2d\u6062\u5fa9\u6578\u64da\u3002<\/li>\n<li>\u5982\u679c\u662f\u6b0a\u9650\u554f\u984c\uff0c\u8acb\u8abf\u6574\u6587\u4ef6\u548c\u76ee\u9304\u7684\u6b0a\u9650\u8a2d\u7f6e\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-pJCfzxpfTn\">\u7e3d\u7d50<\/h2>\n<p>\u6578\u64da\u5eab\u670d\u52d9\u555f\u52d5\u5931\u6557\u662f\u4e00\u500b\u5e38\u898b\u7684\u554f\u984c\uff0c\u4f46\u901a\u904e\u7cfb\u7d71\u7684\u6392\u67e5\u548c\u89e3\u6c7a\u65b9\u6848\uff0c\u901a\u5e38\u53ef\u4ee5\u5feb\u901f\u6062\u5fa9\u670d\u52d9\u3002\u4e86\u89e3\u6578\u64da\u5eab\u7684\u904b\u884c\u539f\u7406\u548c\u5e38\u898b\u554f\u984c\uff0c\u5c0d\u65bc\u7dad\u8b77\u7a69\u5b9a\u7684\u696d\u52d9\u904b\u884c\u81f3\u95dc\u91cd\u8981\u3002\u5982\u679c\u60a8\u9700\u8981\u9032\u4e00\u6b65\u7684\u652f\u6301\u6216\u8003\u616e\u4f7f\u7528\u66f4\u53ef\u9760\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\uff0c\u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\u4ee5\u7372\u53d6\u66f4\u591a\u4fe1\u606f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9047\u5230\u6578\u64da\u5eab\u670d\u52d9\u555f\u52d5\u5931\u6557\uff1f\u4e86\u89e3\u5e38\u898b\u539f\u56e0\u53ca\u89e3\u6c7a\u65b9\u6848\uff0c\u5feb\u901f\u6062\u5fa9\u670d\u52d9\uff0c\u78ba\u4fdd\u7cfb\u7d71\u6b63\u5e38\u904b\u884c\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-166781","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/166781","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=166781"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/166781\/revisions"}],"predecessor-version":[{"id":166782,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/166781\/revisions\/166782"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=166781"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=166781"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=166781"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}