{"id":196251,"date":"2024-11-13T21:43:47","date_gmt":"2024-11-13T13:43:47","guid":{"rendered":"https:\/\/server.hk\/cnblog\/196251\/"},"modified":"2024-11-13T21:43:48","modified_gmt":"2024-11-13T13:43:48","slug":"%e6%89%be%e5%88%b0%e6%95%b8%e6%93%9a%e5%ba%ab%e6%96%87%e4%bb%b6%e7%9a%84%e6%96%b9%e6%b3%95-%e6%80%8e%e9%ba%bc%e6%89%be%e6%95%b8%e6%93%9a%e5%ba%ab%e6%96%87%e4%bb%b6%e4%bd%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/196251\/","title":{"rendered":"\u627e\u5230\u6578\u64da\u5eab\u6587\u4ef6\u7684\u65b9\u6cd5 (\u600e\u9ebc\u627e\u6578\u64da\u5eab\u6587\u4ef6\u4f4d\u7f6e)"},"content":{"rendered":"<h1 id=\"%e6%89%be%e5%88%b0%e6%95%b8%e6%93%9a%e5%ba%ab%e6%96%87%e4%bb%b6%e7%9a%84%e6%96%b9%e6%b3%95-%e6%80%8e%e9%ba%bc%e6%89%be%e6%95%b8%e6%93%9a%e5%ba%ab%e6%96%87%e4%bb%b6%e4%bd%8d%e7%bd%ae-TaVYKmTNtZ\">\u627e\u5230\u6578\u64da\u5eab\u6587\u4ef6\u7684\u65b9\u6cd5 (\u600e\u9ebc\u627e\u6578\u64da\u5eab\u6587\u4ef6\u4f4d\u7f6e)<\/h1>\n<p>\u5728\u7576\u4eca\u6578\u64da\u9a45\u52d5\u7684\u4e16\u754c\u4e2d\uff0c\u6578\u64da\u5eab\u626e\u6f14\u8457\u81f3\u95dc\u91cd\u8981\u7684\u89d2\u8272\u3002\u7121\u8ad6\u662f\u4f01\u696d\u9084\u662f\u500b\u4eba\u9805\u76ee\uff0c\u6578\u64da\u5eab\u90fd\u7528\u65bc\u5b58\u5132\u548c\u7ba1\u7406\u4fe1\u606f\u3002\u7136\u800c\uff0c\u8a31\u591a\u7528\u6236\u5728\u4f7f\u7528\u6578\u64da\u5eab\u6642\uff0c\u5e38\u5e38\u6703\u9047\u5230\u4e00\u500b\u554f\u984c\uff1a\u5982\u4f55\u627e\u5230\u6578\u64da\u5eab\u6587\u4ef6\u7684\u4f4d\u7f6e\uff1f\u672c\u6587\u5c07\u63a2\u8a0e\u5e7e\u7a2e\u5e38\u898b\u7684\u6578\u64da\u5eab\u7cfb\u7d71\u53ca\u5176\u6587\u4ef6\u4f4d\u7f6e\u7684\u67e5\u627e\u65b9\u6cd5\u3002<\/p>\n<h2 id=\"1-mysql-%e6%95%b8%e6%93%9a%e5%ba%ab-TaVYKmTNtZ\">1. MySQL \u6578\u64da\u5eab<\/h2>\n<p>MySQL \u662f\u4e00\u500b\u6d41\u884c\u7684\u958b\u6e90\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\uff0c\u5ee3\u6cdb\u61c9\u7528\u65bc\u5404\u7a2e\u7db2\u7ad9\u548c\u61c9\u7528\u7a0b\u5e8f\u4e2d\u3002\u8981\u627e\u5230 MySQL \u6578\u64da\u5eab\u6587\u4ef6\u7684\u4f4d\u7f6e\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9a5f\u9032\u884c\uff1a<\/p>\n<ul>\n<li>\u9996\u5148\uff0c\u767b\u9304\u5230 MySQL \u6578\u64da\u5eab\u3002\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u6216\u5716\u5f62\u754c\u9762\u5de5\u5177\uff08\u5982 phpMyAdmin\uff09\u9032\u884c\u767b\u9304\u3002<\/li>\n<li>\u57f7\u884c\u4ee5\u4e0b SQL \u67e5\u8a62\u4ee5\u7372\u53d6\u6578\u64da\u5eab\u7684\u6587\u4ef6\u8def\u5f91\uff1a<\/li>\n<\/ul>\n<pre><code>SHOW VARIABLES LIKE 'datadir';<\/code><\/pre>\n<p>\u9019\u689d\u547d\u4ee4\u5c07\u8fd4\u56de MySQL \u6578\u64da\u5eab\u7684\u6578\u64da\u76ee\u9304\uff0c\u901a\u5e38\u662f\u4ee5 .frm\u3001.ibd \u6216 .myd \u70ba\u64f4\u5c55\u540d\u7684\u6587\u4ef6\u3002<\/p>\n<h2 id=\"2-postgresql-%e6%95%b8%e6%93%9a%e5%ba%ab-TaVYKmTNtZ\">2. PostgreSQL \u6578\u64da\u5eab<\/h2>\n<p>PostgreSQL \u662f\u53e6\u4e00\u500b\u5f37\u5927\u7684\u958b\u6e90\u6578\u64da\u5eab\u7cfb\u7d71\u3002\u8981\u67e5\u627e PostgreSQL \u6578\u64da\u5eab\u6587\u4ef6\u7684\u4f4d\u7f6e\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u65b9\u6cd5\uff1a<\/p>\n<ul>\n<li>\u9996\u5148\uff0c\u9023\u63a5\u5230 PostgreSQL \u6578\u64da\u5eab\u3002<\/li>\n<li>\u7136\u5f8c\uff0c\u57f7\u884c\u4ee5\u4e0b SQL \u67e5\u8a62\uff1a<\/li>\n<\/ul>\n<pre><code>SHOW data_directory;<\/code><\/pre>\n<p>\u9019\u5c07\u986f\u793a PostgreSQL \u6578\u64da\u5eab\u7684\u6578\u64da\u76ee\u9304\uff0c\u901a\u5e38\u5305\u542b\u6240\u6709\u6578\u64da\u5eab\u7684\u6587\u4ef6\u3002<\/p>\n<h2 id=\"3-sqlite-%e6%95%b8%e6%93%9a%e5%ba%ab-TaVYKmTNtZ\">3. SQLite \u6578\u64da\u5eab<\/h2>\n<p>SQLite \u662f\u4e00\u500b\u8f15\u91cf\u7d1a\u7684\u6578\u64da\u5eab\uff0c\u901a\u5e38\u7528\u65bc\u5c0f\u578b\u61c9\u7528\u7a0b\u5e8f\u548c\u79fb\u52d5\u8a2d\u5099\u3002SQLite \u6578\u64da\u5eab\u6587\u4ef6\u901a\u5e38\u662f\u55ae\u4e00\u7684 .sqlite \u6216 .db \u6587\u4ef6\u3002\u8981\u627e\u5230 SQLite \u6578\u64da\u5eab\u6587\u4ef6\u7684\u4f4d\u7f6e\uff0c\u53ef\u4ee5\u67e5\u770b\u61c9\u7528\u7a0b\u5e8f\u7684\u914d\u7f6e\u6587\u4ef6\u6216\u4ee3\u78bc\uff0c\u901a\u5e38\u6703\u6307\u5b9a\u6578\u64da\u5eab\u6587\u4ef6\u7684\u8def\u5f91\u3002<\/p>\n<h2 id=\"4-microsoft-sql-server-TaVYKmTNtZ\">4. Microsoft SQL Server<\/h2>\n<p>\u5c0d\u65bc Microsoft SQL Server\uff0c\u7528\u6236\u53ef\u4ee5\u901a\u904e SQL Server Management Studio (SSMS) \u4f86\u67e5\u627e\u6578\u64da\u5eab\u6587\u4ef6\u7684\u4f4d\u7f6e\uff1a<\/p>\n<ul>\n<li>\u5728 SSMS \u4e2d\uff0c\u9023\u63a5\u5230 SQL Server \u5be6\u4f8b\u3002<\/li>\n<li>\u5c55\u958b\u201c\u6578\u64da\u5eab\u201d\u7bc0\u9ede\uff0c\u53f3\u9375\u55ae\u64ca\u6240\u9700\u7684\u6578\u64da\u5eab\uff0c\u7136\u5f8c\u9078\u64c7\u201c\u5c6c\u6027\u201d\u3002<\/li>\n<li>\u5728\u201c\u6587\u4ef6\u201d\u9078\u9805\u5361\u4e2d\uff0c\u53ef\u4ee5\u770b\u5230\u6578\u64da\u5eab\u6587\u4ef6\u7684\u8def\u5f91\u548c\u540d\u7a31\u3002<\/li>\n<\/ul>\n<h2 id=\"5-oracle-%e6%95%b8%e6%93%9a%e5%ba%ab-TaVYKmTNtZ\">5. Oracle \u6578\u64da\u5eab<\/h2>\n<p>Oracle \u6578\u64da\u5eab\u7684\u6587\u4ef6\u4f4d\u7f6e\u53ef\u4ee5\u901a\u904e\u67e5\u8a62\u6578\u64da\u5b57\u5178\u8996\u5716\u4f86\u7372\u53d6\uff1a<\/p>\n<pre><code>SELECT file_name FROM dba_data_files;<\/code><\/pre>\n<p>\u9019\u689d\u67e5\u8a62\u5c07\u8fd4\u56de\u6240\u6709\u6578\u64da\u6587\u4ef6\u7684\u8def\u5f91\uff0c\u5e6b\u52a9\u7528\u6236\u627e\u5230\u6240\u9700\u7684\u6578\u64da\u5eab\u6587\u4ef6\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-TaVYKmTNtZ\">\u7e3d\u7d50<\/h2>\n<p>\u627e\u5230\u6578\u64da\u5eab\u6587\u4ef6\u7684\u4f4d\u7f6e\u5c0d\u65bc\u6578\u64da\u7ba1\u7406\u548c\u7dad\u8b77\u81f3\u95dc\u91cd\u8981\u3002\u7121\u8ad6\u60a8\u4f7f\u7528\u7684\u662f MySQL\u3001PostgreSQL\u3001SQLite\u3001Microsoft SQL Server \u9084\u662f Oracle \u6578\u64da\u5eab\uff0c\u4e86\u89e3\u5982\u4f55\u67e5\u627e\u9019\u4e9b\u6587\u4ef6\u90fd\u80fd\u5e6b\u52a9\u60a8\u66f4\u6709\u6548\u5730\u7ba1\u7406\u6578\u64da\u3002\u82e5\u60a8\u9700\u8981\u66f4\u9ad8\u6548\u7684\u6578\u64da\u5eab\u89e3\u6c7a\u65b9\u6848\uff0c\u8003\u616e\u4f7f\u7528 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u670d\u52d9\uff0c\u9019\u5c07\u70ba\u60a8\u7684\u6578\u64da\u5eab\u63d0\u4f9b\u7a69\u5b9a\u7684\u652f\u6301\u548c\u9748\u6d3b\u7684\u64f4\u5c55\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b78\u7fd2\u5982\u4f55\u627e\u5230\u6578\u64da\u5eab\u6587\u4ef6\u7684\u4f4d\u7f6e\uff0c\u638c\u63e1\u6709\u6548\u7684\u65b9\u6cd5\u548c\u6280\u5de7\uff0c\u8f15\u9b06\u5b9a\u4f4d\u60a8\u7684\u6578\u64da\u5eab\u6587\u4ef6\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-196251","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/196251","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=196251"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/196251\/revisions"}],"predecessor-version":[{"id":196252,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/196251\/revisions\/196252"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=196251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=196251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=196251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}