{"id":152247,"date":"2024-11-01T21:20:22","date_gmt":"2024-11-01T13:20:22","guid":{"rendered":"https:\/\/server.hk\/cnblog\/152247\/"},"modified":"2024-11-01T21:20:23","modified_gmt":"2024-11-01T13:20:23","slug":"%e4%b8%8d%e5%90%8c%e6%95%b8%e6%93%9a%e5%ba%ab%e5%b0%8d%e6%95%b8%e6%93%9a%e5%ba%ab%e9%80%a3%e6%8e%a5%e5%87%ba%e9%8c%af%e6%99%82%e7%9a%84%e8%a7%a3%e6%b1%ba%e6%96%b9%e6%a1%88","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/152247\/","title":{"rendered":"\u4e0d\u540c\u6578\u64da\u5eab\u5c0d\u6578\u64da\u5eab\u9023\u63a5\u51fa\u932f\u6642\u7684\u89e3\u6c7a\u65b9\u6848"},"content":{"rendered":"<h1 id=\"%e4%b8%8d%e5%90%8c%e6%95%b8%e6%93%9a%e5%ba%ab%e5%b0%8d%e6%95%b8%e6%93%9a%e5%ba%ab%e9%80%a3%e6%8e%a5%e5%87%ba%e9%8c%af%e6%99%82%e7%9a%84%e8%a7%a3%e6%b1%ba%e6%96%b9%e6%a1%88-wPmpahCmwR\">\u4e0d\u540c\u6578\u64da\u5eab\u5c0d\u6578\u64da\u5eab\u9023\u63a5\u51fa\u932f\u6642\u7684\u89e3\u6c7a\u65b9\u6848<\/h1>\n<p>\u5728\u7576\u4eca\u7684\u6578\u64da\u9a45\u52d5\u6642\u4ee3\uff0c\u6578\u64da\u5eab\u7684\u7a69\u5b9a\u6027\u548c\u53ef\u9760\u6027\u5c0d\u65bc\u61c9\u7528\u7a0b\u5e8f\u7684\u904b\u884c\u81f3\u95dc\u91cd\u8981\u3002\u7136\u800c\uff0c\u7121\u8ad6\u662f\u95dc\u4fc2\u578b\u6578\u64da\u5eab\u9084\u662f\u975e\u95dc\u4fc2\u578b\u6578\u64da\u5eab\uff0c\u6578\u64da\u5eab\u9023\u63a5\u51fa\u932f\u7684\u60c5\u6cc1\u6642\u6709\u767c\u751f\u3002\u672c\u6587\u5c07\u63a2\u8a0e\u4e0d\u540c\u6578\u64da\u5eab\u5728\u9023\u63a5\u51fa\u932f\u6642\u7684\u89e3\u6c7a\u65b9\u6848\uff0c\u5e6b\u52a9\u958b\u767c\u8005\u66f4\u6709\u6548\u5730\u6392\u67e5\u548c\u89e3\u6c7a\u554f\u984c\u3002<\/p>\n<h2 id=\"1-mysql-%e6%95%b8%e6%93%9a%e5%ba%ab%e9%80%a3%e6%8e%a5%e9%8c%af%e8%aa%a4%e7%9a%84%e8%a7%a3%e6%b1%ba%e6%96%b9%e6%a1%88-wPmpahCmwR\">1. MySQL \u6578\u64da\u5eab\u9023\u63a5\u932f\u8aa4\u7684\u89e3\u6c7a\u65b9\u6848<\/h2>\n<p>MySQL \u662f\u6700\u6d41\u884c\u7684\u958b\u6e90\u95dc\u4fc2\u578b\u6578\u64da\u5eab\u4e4b\u4e00\u3002\u7576\u51fa\u73fe\u9023\u63a5\u932f\u8aa4\u6642\uff0c\u901a\u5e38\u53ef\u4ee5\u5f9e\u4ee5\u4e0b\u5e7e\u500b\u65b9\u9762\u9032\u884c\u6392\u67e5\uff1a<\/p>\n<ul>\n<li><strong>\u6aa2\u67e5\u7528\u6236\u540d\u548c\u5bc6\u78bc\uff1a<\/strong>\u78ba\u4fdd\u4f7f\u7528\u7684\u7528\u6236\u540d\u548c\u5bc6\u78bc\u6b63\u78ba\u7121\u8aa4\u3002\u53ef\u4ee5\u901a\u904e\u547d\u4ee4\u884c\u6e2c\u8a66\u9023\u63a5\uff1a<\/li>\n<pre><code>mysql -u username -p<\/code><\/pre>\n<li><strong>\u6aa2\u67e5\u4e3b\u6a5f\u5730\u5740\uff1a<\/strong>\u78ba\u4fdd\u9023\u63a5\u7684\u4e3b\u6a5f\u5730\u5740\u6b63\u78ba\u3002\u5982\u679c\u6578\u64da\u5eab\u5728\u672c\u5730\u904b\u884c\uff0c\u4e3b\u6a5f\u5730\u5740\u61c9\u70ba <code>localhost<\/code>\u3002<\/li>\n<li><strong>\u6aa2\u67e5\u7aef\u53e3\u865f\uff1a<\/strong>\u9ed8\u8a8d\u60c5\u6cc1\u4e0b\uff0cMySQL \u4f7f\u7528 3306 \u7aef\u53e3\u3002\u5982\u679c\u6578\u64da\u5eab\u914d\u7f6e\u4e86\u4e0d\u540c\u7684\u7aef\u53e3\uff0c\u5247\u9700\u8981\u5728\u9023\u63a5\u5b57\u7b26\u4e32\u4e2d\u6307\u5b9a\u3002<\/li>\n<li><strong>\u6aa2\u67e5\u9632\u706b\u7246\u8a2d\u7f6e\uff1a<\/strong>\u78ba\u4fdd\u9632\u706b\u7246\u5141\u8a31\u901a\u904e\u6307\u5b9a\u7aef\u53e3\u7684\u6d41\u91cf\u3002<\/li>\n<\/ul>\n<h2 id=\"2-postgresql-%e6%95%b8%e6%93%9a%e5%ba%ab%e9%80%a3%e6%8e%a5%e9%8c%af%e8%aa%a4%e7%9a%84%e8%a7%a3%e6%b1%ba%e6%96%b9%e6%a1%88-wPmpahCmwR\">2. PostgreSQL \u6578\u64da\u5eab\u9023\u63a5\u932f\u8aa4\u7684\u89e3\u6c7a\u65b9\u6848<\/h2>\n<p>PostgreSQL \u662f\u4e00\u500b\u529f\u80fd\u5f37\u5927\u7684\u958b\u6e90\u95dc\u4fc2\u578b\u6578\u64da\u5eab\u3002\u7576\u9047\u5230\u9023\u63a5\u554f\u984c\u6642\uff0c\u53ef\u4ee5\u8003\u616e\u4ee5\u4e0b\u5e7e\u9ede\uff1a<\/p>\n<ul>\n<li><strong>\u6aa2\u67e5 pg_hba.conf \u6587\u4ef6\uff1a<\/strong>\u8a72\u6587\u4ef6\u63a7\u5236\u4e86\u54ea\u4e9b\u7528\u6236\u53ef\u4ee5\u5f9e\u54ea\u4e9b\u4e3b\u6a5f\u9023\u63a5\u5230\u6578\u64da\u5eab\u3002\u78ba\u4fdd\u914d\u7f6e\u6b63\u78ba\uff0c\u4e26\u5141\u8a31\u6240\u9700\u7684\u7528\u6236\u548c\u4e3b\u6a5f\u3002<\/li>\n<li><strong>\u6aa2\u67e5\u670d\u52d9\u72c0\u614b\uff1a<\/strong>\u78ba\u4fdd PostgreSQL \u670d\u52d9\u6b63\u5728\u904b\u884c\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6aa2\u67e5\u670d\u52d9\u72c0\u614b\uff1a<\/li>\n<pre><code>sudo systemctl status postgresql<\/code><\/pre>\n<li><strong>\u6aa2\u67e5\u9023\u63a5\u5b57\u7b26\u4e32\uff1a<\/strong>\u78ba\u4fdd\u9023\u63a5\u5b57\u7b26\u4e32\u683c\u5f0f\u6b63\u78ba\uff0c\u5305\u62ec\u7528\u6236\u540d\u3001\u5bc6\u78bc\u3001\u6578\u64da\u5eab\u540d\u548c\u4e3b\u6a5f\u5730\u5740\u3002<\/li>\n<\/ul>\n<h2 id=\"3-mongodb-%e6%95%b8%e6%93%9a%e5%ba%ab%e9%80%a3%e6%8e%a5%e9%8c%af%e8%aa%a4%e7%9a%84%e8%a7%a3%e6%b1%ba%e6%96%b9%e6%a1%88-wPmpahCmwR\">3. MongoDB \u6578\u64da\u5eab\u9023\u63a5\u932f\u8aa4\u7684\u89e3\u6c7a\u65b9\u6848<\/h2>\n<p>MongoDB \u662f\u4e00\u500b\u6d41\u884c\u7684\u975e\u95dc\u4fc2\u578b\u6578\u64da\u5eab\uff0c\u7576\u51fa\u73fe\u9023\u63a5\u554f\u984c\u6642\uff0c\u53ef\u4ee5\u63a1\u53d6\u4ee5\u4e0b\u63aa\u65bd\uff1a<\/p>\n<ul>\n<li><strong>\u6aa2\u67e5 MongoDB \u670d\u52d9\u72c0\u614b\uff1a<\/strong>\u78ba\u4fdd MongoDB \u670d\u52d9\u6b63\u5728\u904b\u884c\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6aa2\u67e5\uff1a<\/li>\n<pre><code>sudo systemctl status mongod<\/code><\/pre>\n<li><strong>\u6aa2\u67e5\u9023\u63a5 URI\uff1a<\/strong>\u78ba\u4fdd\u4f7f\u7528\u7684\u9023\u63a5 URI \u6b63\u78ba\uff0c\u5305\u62ec\u7528\u6236\u540d\u3001\u5bc6\u78bc\u548c\u6578\u64da\u5eab\u540d\u7a31\u3002<\/li>\n<li><strong>\u6aa2\u67e5\u7db2\u7d61\u8a2d\u7f6e\uff1a<\/strong>\u78ba\u4fdd MongoDB \u914d\u7f6e\u5141\u8a31\u5916\u90e8\u9023\u63a5\uff0c\u7279\u5225\u662f\u5728\u96f2\u74b0\u5883\u4e2d\u3002<\/li>\n<\/ul>\n<h2 id=\"4-oracle-%e6%95%b8%e6%93%9a%e5%ba%ab%e9%80%a3%e6%8e%a5%e9%8c%af%e8%aa%a4%e7%9a%84%e8%a7%a3%e6%b1%ba%e6%96%b9%e6%a1%88-wPmpahCmwR\">4. Oracle \u6578\u64da\u5eab\u9023\u63a5\u932f\u8aa4\u7684\u89e3\u6c7a\u65b9\u6848<\/h2>\n<p>Oracle \u6578\u64da\u5eab\u662f\u4f01\u696d\u7d1a\u7684\u95dc\u4fc2\u578b\u6578\u64da\u5eab\uff0c\u7576\u51fa\u73fe\u9023\u63a5\u554f\u984c\u6642\uff0c\u53ef\u4ee5\u8003\u616e\u4ee5\u4e0b\u5e7e\u9ede\uff1a<\/p>\n<ul>\n<li><strong>\u6aa2\u67e5 TNS \u914d\u7f6e\uff1a<\/strong>\u78ba\u4fdd TNS \u914d\u7f6e\u6587\u4ef6\u6b63\u78ba\uff0c\u4e26\u4e14\u80fd\u5920\u89e3\u6790\u5230\u6b63\u78ba\u7684\u6578\u64da\u5eab\u670d\u52d9\u3002<\/li>\n<li><strong>\u6aa2\u67e5\u7528\u6236\u6b0a\u9650\uff1a<\/strong>\u78ba\u4fdd\u7528\u6236\u64c1\u6709\u8db3\u5920\u7684\u6b0a\u9650\u4f86\u9023\u63a5\u5230\u6578\u64da\u5eab\u3002<\/li>\n<li><strong>\u6aa2\u67e5 Listener \u72c0\u614b\uff1a<\/strong>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6aa2\u67e5 Oracle Listener \u7684\u72c0\u614b\uff1a<\/li>\n<pre><code>lsnrctl status<\/code><\/pre>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-wPmpahCmwR\">\u7e3d\u7d50<\/h2>\n<p>\u6578\u64da\u5eab\u9023\u63a5\u932f\u8aa4\u662f\u958b\u767c\u904e\u7a0b\u4e2d\u5e38\u898b\u7684\u554f\u984c\uff0c\u4e86\u89e3\u4e0d\u540c\u6578\u64da\u5eab\u7684\u7279\u5b9a\u89e3\u6c7a\u65b9\u6848\u53ef\u4ee5\u5e6b\u52a9\u958b\u767c\u8005\u66f4\u5feb\u5730\u6392\u67e5\u554f\u984c\u3002\u7121\u8ad6\u662f MySQL\u3001PostgreSQL\u3001MongoDB \u9084\u662f Oracle\uff0c\u638c\u63e1\u57fa\u672c\u7684\u6545\u969c\u6392\u9664\u6280\u5de7\u90fd\u662f\u81f3\u95dc\u91cd\u8981\u7684\u3002\u82e5\u60a8\u9700\u8981\u7a69\u5b9a\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u4f86\u904b\u884c\u60a8\u7684\u6578\u64da\u5eab\uff0cServer.HK \u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\uff0c\u6eff\u8db3\u4e0d\u540c\u9700\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63a2\u7d22\u4e0d\u540c\u6578\u64da\u5eab\u5728\u9023\u63a5\u932f\u8aa4\u6642\u7684\u89e3\u6c7a\u65b9\u6848\uff0c\u5e6b\u52a9\u60a8\u5feb\u901f\u6392\u9664\u6545\u969c\uff0c\u78ba\u4fdd\u6578\u64da\u6d41\u66a2\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-152247","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/152247","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=152247"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/152247\/revisions"}],"predecessor-version":[{"id":152248,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/152247\/revisions\/152248"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=152247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=152247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=152247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}