{"id":162261,"date":"2024-11-04T13:33:17","date_gmt":"2024-11-04T05:33:17","guid":{"rendered":"https:\/\/server.hk\/cnblog\/162261\/"},"modified":"2024-11-04T13:33:18","modified_gmt":"2024-11-04T05:33:18","slug":"%e7%b0%a1%e4%be%bf%e6%98%93%e6%87%82%e7%9a%84%e9%81%94%e5%a4%a2%e6%95%b8%e6%93%9a%e5%ba%ab%e6%97%a5%e8%aa%8c%e6%9f%a5%e8%a9%a2%e6%96%b9%e6%b3%95-%e9%81%94%e5%a4%a2%e6%95%b8%e6%93%9a%e5%ba%ab%e6%97%a5","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/162261\/","title":{"rendered":"\u7c21\u4fbf\u6613\u61c2\u7684\u9054\u5922\u6578\u64da\u5eab\u65e5\u8a8c\u67e5\u8a62\u65b9\u6cd5 (\u9054\u5922\u6578\u64da\u5eab\u65e5\u8a8c\u67e5\u8a62)"},"content":{"rendered":"<h1 id=\"%e7%b0%a1%e4%be%bf%e6%98%93%e6%87%82%e7%9a%84%e9%81%94%e5%a4%a2%e6%95%b8%e6%93%9a%e5%ba%ab%e6%97%a5%e8%aa%8c%e6%9f%a5%e8%a9%a2%e6%96%b9%e6%b3%95-XXAHdZtOBn\">\u7c21\u4fbf\u6613\u61c2\u7684\u9054\u5922\u6578\u64da\u5eab\u65e5\u8a8c\u67e5\u8a62\u65b9\u6cd5<\/h1>\n<p>\u9054\u5922\u6578\u64da\u5eab\uff08DM Database\uff09\u662f\u4e00\u6b3e\u5728\u4e2d\u570b\u5ee3\u6cdb\u4f7f\u7528\u7684\u95dc\u4fc2\u578b\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\uff0c\u56e0\u5176\u9ad8\u6548\u80fd\u548c\u7a69\u5b9a\u6027\u800c\u53d7\u5230\u4f01\u696d\u7684\u9752\u775e\u3002\u5728\u65e5\u5e38\u904b\u884c\u4e2d\uff0c\u6578\u64da\u5eab\u7684\u65e5\u8a8c\u67e5\u8a62\u662f\u7dad\u8b77\u6578\u64da\u5b8c\u6574\u6027\u548c\u7cfb\u7d71\u5b89\u5168\u7684\u91cd\u8981\u74b0\u7bc0\u3002\u672c\u6587\u5c07\u4ecb\u7d39\u9054\u5922\u6578\u64da\u5eab\u7684\u65e5\u8a8c\u67e5\u8a62\u65b9\u6cd5\uff0c\u5e6b\u52a9\u7528\u6236\u66f4\u597d\u5730\u7406\u89e3\u548c\u4f7f\u7528\u9019\u4e00\u529f\u80fd\u3002<\/p>\n<h2 id=\"%e4%bb%80%e9%ba%bc%e6%98%af%e9%81%94%e5%a4%a2%e6%95%b8%e6%93%9a%e5%ba%ab%e6%97%a5%e8%aa%8c%ef%bc%9f-XXAHdZtOBn\">\u4ec0\u9ebc\u662f\u9054\u5922\u6578\u64da\u5eab\u65e5\u8a8c\uff1f<\/h2>\n<p>\u9054\u5922\u6578\u64da\u5eab\u65e5\u8a8c\u4e3b\u8981\u5206\u70ba\u5169\u985e\uff1a\u4e8b\u52d9\u65e5\u8a8c\u548c\u64cd\u4f5c\u65e5\u8a8c\u3002\u4e8b\u52d9\u65e5\u8a8c\u8a18\u9304\u4e86\u6240\u6709\u7684\u6578\u64da\u8b8a\u66f4\u64cd\u4f5c\uff0c\u9019\u5c0d\u65bc\u6578\u64da\u6062\u5fa9\u548c\u6545\u969c\u6392\u67e5\u81f3\u95dc\u91cd\u8981\uff1b\u800c\u64cd\u4f5c\u65e5\u8a8c\u5247\u8a18\u9304\u4e86\u7cfb\u7d71\u7684\u904b\u884c\u72c0\u614b\u548c\u7528\u6236\u7684\u64cd\u4f5c\u884c\u70ba\uff0c\u4fbf\u65bc\u5f8c\u671f\u7684\u5be9\u8a08\u548c\u5206\u6790\u3002<\/p>\n<h2 id=\"%e6%97%a5%e8%aa%8c%e6%9f%a5%e8%a9%a2%e7%9a%84%e5%9f%ba%e6%9c%ac%e6%ad%a5%e9%a9%9f-XXAHdZtOBn\">\u65e5\u8a8c\u67e5\u8a62\u7684\u57fa\u672c\u6b65\u9a5f<\/h2>\n<p>\u5728\u9054\u5922\u6578\u64da\u5eab\u4e2d\uff0c\u67e5\u8a62\u65e5\u8a8c\u7684\u904e\u7a0b\u76f8\u5c0d\u7c21\u55ae\uff0c\u4ee5\u4e0b\u662f\u57fa\u672c\u7684\u67e5\u8a62\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"1-%e9%80%a3%e6%8e%a5%e5%88%b0%e6%95%b8%e6%93%9a%e5%ba%ab-XXAHdZtOBn\">1. \u9023\u63a5\u5230\u6578\u64da\u5eab<\/h3>\n<p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u4f7f\u7528\u5408\u9069\u7684\u5de5\u5177\uff08\u5982 DM SQL \u5ba2\u6236\u7aef\uff09\u9023\u63a5\u5230\u9054\u5922\u6578\u64da\u5eab\u3002\u9023\u63a5\u6210\u529f\u5f8c\uff0c\u60a8\u5c07\u80fd\u5920\u57f7\u884c SQL \u67e5\u8a62\u3002<\/p>\n<pre><code>CONNECT 'username\/password@hostname:port\/dbname';<\/code><\/pre>\n<h3 id=\"2-%e6%9f%a5%e8%a9%a2%e4%ba%8b%e5%8b%99%e6%97%a5%e8%aa%8c-XXAHdZtOBn\">2. \u67e5\u8a62\u4e8b\u52d9\u65e5\u8a8c<\/h3>\n<p>\u8981\u67e5\u8a62\u4e8b\u52d9\u65e5\u8a8c\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b SQL \u8a9e\u53e5\uff1a<\/p>\n<pre><code>SELECT * FROM DM_LOG WHERE LOG_TYPE = 'TRANSACTION';<\/code><\/pre>\n<p>\u9019\u689d\u8a9e\u53e5\u5c07\u8fd4\u56de\u6240\u6709\u4e8b\u52d9\u65e5\u8a8c\u7684\u8a18\u9304\uff0c\u60a8\u53ef\u4ee5\u6839\u64da\u9700\u8981\u9032\u4e00\u6b65\u7be9\u9078\u3002<\/p>\n<h3 id=\"3-%e6%9f%a5%e8%a9%a2%e6%93%8d%e4%bd%9c%e6%97%a5%e8%aa%8c-XXAHdZtOBn\">3. \u67e5\u8a62\u64cd\u4f5c\u65e5\u8a8c<\/h3>\n<p>\u82e5\u8981\u67e5\u8a62\u64cd\u4f5c\u65e5\u8a8c\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b SQL \u8a9e\u53e5\uff1a<\/p>\n<pre><code>SELECT * FROM DM_LOG WHERE LOG_TYPE = 'OPERATION';<\/code><\/pre>\n<p>\u9019\u6a23\u53ef\u4ee5\u7372\u53d6\u6240\u6709\u64cd\u4f5c\u65e5\u8a8c\u7684\u8a73\u7d30\u4fe1\u606f\uff0c\u5e6b\u52a9\u60a8\u4e86\u89e3\u7cfb\u7d71\u7684\u904b\u884c\u72c0\u614b\u3002<\/p>\n<h2 id=\"%e6%97%a5%e8%aa%8c%e6%9f%a5%e8%a9%a2%e7%9a%84%e7%af%a9%e9%81%b8%e6%a2%9d%e4%bb%b6-XXAHdZtOBn\">\u65e5\u8a8c\u67e5\u8a62\u7684\u7be9\u9078\u689d\u4ef6<\/h2>\n<p>\u5728\u5be6\u969b\u67e5\u8a62\u4e2d\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u6839\u64da\u7279\u5b9a\u689d\u4ef6\u4f86\u7be9\u9078\u65e5\u8a8c\u8a18\u9304\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u7528\u7684\u7be9\u9078\u689d\u4ef6\uff1a<\/p>\n<ul>\n<li><strong>\u6642\u9593\u7bc4\u570d\uff1a<\/strong>\u53ef\u4ee5\u4f7f\u7528\u6642\u9593\u6233\u4f86\u9650\u5236\u67e5\u8a62\u7684\u7bc4\u570d\u3002<\/li>\n<li><strong>\u7528\u6236\u540d\uff1a<\/strong>\u6839\u64da\u64cd\u4f5c\u7528\u6236\u4f86\u7be9\u9078\u65e5\u8a8c\u3002<\/li>\n<li><strong>\u64cd\u4f5c\u985e\u578b\uff1a<\/strong>\u6839\u64da\u4e0d\u540c\u7684\u64cd\u4f5c\u985e\u578b\uff08\u5982\u63d2\u5165\u3001\u66f4\u65b0\u3001\u522a\u9664\uff09\u4f86\u67e5\u8a62\u3002<\/li>\n<\/ul>\n<p>\u4f8b\u5982\uff0c\u82e5\u8981\u67e5\u8a62\u67d0\u500b\u7528\u6236\u5728\u7279\u5b9a\u6642\u9593\u7bc4\u570d\u5167\u7684\u64cd\u4f5c\u65e5\u8a8c\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b SQL \u8a9e\u53e5\uff1a<\/p>\n<pre><code>SELECT * FROM DM_LOG WHERE LOG_TYPE = 'OPERATION' AND USERNAME = 'your_username' AND LOG_TIME BETWEEN 'start_time' AND 'end_time';<\/code><\/pre>\n<h2 id=\"%e6%97%a5%e8%aa%8c%e6%9f%a5%e8%a9%a2%e7%9a%84%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a0%85-XXAHdZtOBn\">\u65e5\u8a8c\u67e5\u8a62\u7684\u6ce8\u610f\u4e8b\u9805<\/h2>\n<p>\u5728\u9032\u884c\u65e5\u8a8c\u67e5\u8a62\u6642\uff0c\u6709\u5e7e\u9ede\u9700\u8981\u7279\u5225\u6ce8\u610f\uff1a<\/p>\n<ul>\n<li>\u78ba\u4fdd\u60a8\u64c1\u6709\u8db3\u5920\u7684\u6b0a\u9650\u4f86\u67e5\u8a62\u65e5\u8a8c\u3002<\/li>\n<li>\u5b9a\u671f\u6e05\u7406\u904e\u671f\u7684\u65e5\u8a8c\uff0c\u4ee5\u514d\u5f71\u97ff\u6578\u64da\u5eab\u6027\u80fd\u3002<\/li>\n<li>\u5728\u67e5\u8a62\u904e\u7a0b\u4e2d\uff0c\u6ce8\u610f\u65e5\u8a8c\u7684\u5927\u5c0f\u548c\u67e5\u8a62\u7684\u6548\u7387\uff0c\u907f\u514d\u5c0d\u7cfb\u7d71\u9020\u6210\u904e\u5927\u8ca0\u64d4\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-XXAHdZtOBn\">\u7e3d\u7d50<\/h2>\n<p>\u9054\u5922\u6578\u64da\u5eab\u7684\u65e5\u8a8c\u67e5\u8a62\u529f\u80fd\u70ba\u7528\u6236\u63d0\u4f9b\u4e86\u5f37\u5927\u7684\u6578\u64da\u7ba1\u7406\u80fd\u529b\uff0c\u901a\u904e\u7c21\u55ae\u7684 SQL \u67e5\u8a62\u8a9e\u53e5\uff0c\u60a8\u53ef\u4ee5\u8f15\u9b06\u7372\u53d6\u6240\u9700\u7684\u65e5\u8a8c\u4fe1\u606f\u3002\u7121\u8ad6\u662f\u4e8b\u52d9\u65e5\u8a8c\u9084\u662f\u64cd\u4f5c\u65e5\u8a8c\uff0c\u6b63\u78ba\u7684\u67e5\u8a62\u65b9\u6cd5\u90fd\u80fd\u5e6b\u52a9\u60a8\u66f4\u597d\u5730\u7dad\u8b77\u6578\u64da\u5eab\u7684\u5b89\u5168\u6027\u548c\u7a69\u5b9a\u6027\u3002\u5982\u679c\u60a8\u9700\u8981\u66f4\u9ad8\u6548\u7684\u6578\u64da\u7ba1\u7406\u89e3\u6c7a\u65b9\u6848\uff0c\u53ef\u4ee5\u8003\u616e\u4f7f\u7528<a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a>\u6216<a href=\"https:\/\/server.hk\">\u9999\u6e2f\u4f3a\u670d\u5668<\/a>\u4f86\u652f\u6301\u60a8\u7684\u696d\u52d9\u9700\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63a2\u7d22\u7c21\u4fbf\u6613\u61c2\u7684\u9054\u5922\u6578\u64da\u5eab\u65e5\u8a8c\u67e5\u8a62\u65b9\u6cd5\uff0c\u5feb\u901f\u638c\u63e1\u6578\u64da\u7ba1\u7406\u6280\u5de7\uff0c\u63d0\u5347\u5de5\u4f5c\u6548\u7387\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-162261","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/162261","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=162261"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/162261\/revisions"}],"predecessor-version":[{"id":162262,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/162261\/revisions\/162262"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=162261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=162261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=162261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}