{"id":180038,"date":"2024-11-09T06:53:17","date_gmt":"2024-11-08T22:53:17","guid":{"rendered":"https:\/\/server.hk\/cnblog\/180038\/"},"modified":"2024-11-09T06:53:18","modified_gmt":"2024-11-08T22:53:18","slug":"%e5%a6%82%e4%bd%95%e6%ad%a3%e7%a2%ba%e5%8d%b8%e8%bc%89%e6%95%b8%e6%93%9a%e5%ba%ab2023%ef%bc%9f-%e6%95%b8%e6%93%9a%e5%ba%ab2023%e7%9a%84%e5%8d%b8%e8%bc%89","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/180038\/","title":{"rendered":"\u5982\u4f55\u6b63\u78ba\u5378\u8f09\u6578\u64da\u5eab2023\uff1f (\u6578\u64da\u5eab2023\u7684\u5378\u8f09)"},"content":{"rendered":"<h1 id=\"%e5%a6%82%e4%bd%95%e6%ad%a3%e7%a2%ba%e5%8d%b8%e8%bc%89%e6%95%b8%e6%93%9a%e5%ba%ab2023%ef%bc%9f-%e6%95%b8%e6%93%9a%e5%ba%ab2023%e7%9a%84%e5%8d%b8%e8%bc%89-nIoUzLZvin\">\u5982\u4f55\u6b63\u78ba\u5378\u8f09\u6578\u64da\u5eab2023\uff1f (\u6578\u64da\u5eab2023\u7684\u5378\u8f09)<\/h1>\n<p>\u5728\u7576\u4eca\u6578\u64da\u9a45\u52d5\u7684\u4e16\u754c\u4e2d\uff0c\u6578\u64da\u5eab\u7684\u7ba1\u7406\u548c\u7dad\u8b77\u8b8a\u5f97\u8d8a\u4f86\u8d8a\u91cd\u8981\u3002\u7121\u8ad6\u662f\u56e0\u70ba\u5347\u7d1a\u3001\u9077\u79fb\u9084\u662f\u5b89\u5168\u8003\u91cf\uff0c\u6b63\u78ba\u5378\u8f09\u6578\u64da\u5eab\u90fd\u662f\u4e00\u9805\u5fc5\u4e0d\u53ef\u5c11\u7684\u6280\u80fd\u3002\u672c\u6587\u5c07\u63a2\u8a0e\u5982\u4f55\u57282023\u5e74\u6b63\u78ba\u5378\u8f09\u6578\u64da\u5eab\uff0c\u4e26\u63d0\u4f9b\u4e00\u4e9b\u5be6\u7528\u7684\u6b65\u9a5f\u548c\u5efa\u8b70\u3002<\/p>\n<h2 id=\"%e7%82%ba%e4%bb%80%e9%ba%bc%e9%9c%80%e8%a6%81%e5%8d%b8%e8%bc%89%e6%95%b8%e6%93%9a%e5%ba%ab%ef%bc%9f-nIoUzLZvin\">\u70ba\u4ec0\u9ebc\u9700\u8981\u5378\u8f09\u6578\u64da\u5eab\uff1f<\/h2>\n<p>\u5378\u8f09\u6578\u64da\u5eab\u7684\u539f\u56e0\u6709\u5f88\u591a\uff0c\u4e3b\u8981\u5305\u62ec\uff1a<\/p>\n<ul>\n<li><strong>\u5347\u7d1a\uff1a<\/strong>\u7576\u9700\u8981\u5347\u7d1a\u5230\u65b0\u7248\u672c\u7684\u6578\u64da\u5eab\u6642\uff0c\u901a\u5e38\u9700\u8981\u5148\u5378\u8f09\u820a\u7248\u672c\u3002<\/li>\n<li><strong>\u9077\u79fb\uff1a<\/strong>\u5728\u5c07\u6578\u64da\u5eab\u9077\u79fb\u5230\u65b0\u7684\u4f3a\u670d\u5668\u6216\u74b0\u5883\u6642\uff0c\u5fc5\u9808\u5148\u5378\u8f09\u820a\u7684\u6578\u64da\u5eab\u3002<\/li>\n<li><strong>\u5b89\u5168\uff1a<\/strong>\u5982\u679c\u6578\u64da\u5eab\u53d7\u5230\u653b\u64ca\u6216\u51fa\u73fe\u5b89\u5168\u6f0f\u6d1e\uff0c\u5378\u8f09\u4e26\u91cd\u65b0\u5b89\u88dd\u53ef\u80fd\u662f\u5fc5\u8981\u7684\u3002<\/li>\n<li><strong>\u6e05\u7406\uff1a<\/strong>\u4e0d\u518d\u4f7f\u7528\u7684\u6578\u64da\u5eab\u61c9\u8a72\u88ab\u5378\u8f09\u4ee5\u91cb\u653e\u8cc7\u6e90\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%8d%b8%e8%bc%89%e6%95%b8%e6%93%9a%e5%ba%ab%e7%9a%84%e6%ad%a5%e9%a9%9f-nIoUzLZvin\">\u5378\u8f09\u6578\u64da\u5eab\u7684\u6b65\u9a5f<\/h2>\n<p>\u4ee5\u4e0b\u662f\u5378\u8f09\u6578\u64da\u5eab\u7684\u4e00\u822c\u6b65\u9a5f\uff0c\u9019\u4e9b\u6b65\u9a5f\u9069\u7528\u65bc\u5927\u591a\u6578\u4e3b\u6d41\u6578\u64da\u5eab\u7cfb\u7d71\uff0c\u5982MySQL\u3001PostgreSQL\u548cMongoDB\u7b49\u3002<\/p>\n<h3 id=\"1-%e5%82%99%e4%bb%bd%e6%95%b8%e6%93%9a-nIoUzLZvin\">1. \u5099\u4efd\u6578\u64da<\/h3>\n<p>\u5728\u5378\u8f09\u6578\u64da\u5eab\u4e4b\u524d\uff0c\u9996\u5148\u8981\u78ba\u4fdd\u6240\u6709\u91cd\u8981\u6578\u64da\u90fd\u5df2\u5099\u4efd\u3002\u9019\u53ef\u4ee5\u901a\u904e\u6578\u64da\u5eab\u7684\u5167\u5efa\u5099\u4efd\u5de5\u5177\u6216\u4f7f\u7528\u7b2c\u4e09\u65b9\u5099\u4efd\u89e3\u6c7a\u65b9\u6848\u4f86\u5b8c\u6210\u3002<\/p>\n<pre><code>mysqldump -u username -p database_name &gt; backup.sql<\/code><\/pre>\n<h3 id=\"2-%e5%81%9c%e6%ad%a2%e6%95%b8%e6%93%9a%e5%ba%ab%e6%9c%8d%e5%8b%99-nIoUzLZvin\">2. \u505c\u6b62\u6578\u64da\u5eab\u670d\u52d9<\/h3>\n<p>\u5728\u5378\u8f09\u6578\u64da\u5eab\u4e4b\u524d\uff0c\u5fc5\u9808\u505c\u6b62\u76f8\u95dc\u7684\u6578\u64da\u5eab\u670d\u52d9\u3002\u9019\u53ef\u4ee5\u901a\u904e\u547d\u4ee4\u884c\u6216\u670d\u52d9\u7ba1\u7406\u5de5\u5177\u4f86\u5b8c\u6210\u3002<\/p>\n<pre><code>sudo systemctl stop mysql<\/code><\/pre>\n<h3 id=\"3-%e5%8d%b8%e8%bc%89%e6%95%b8%e6%93%9a%e5%ba%ab-nIoUzLZvin\">3. \u5378\u8f09\u6578\u64da\u5eab<\/h3>\n<p>\u6839\u64da\u6240\u4f7f\u7528\u7684\u6578\u64da\u5eab\u7cfb\u7d71\uff0c\u5378\u8f09\u7684\u547d\u4ee4\u6703\u6709\u6240\u4e0d\u540c\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u898b\u6578\u64da\u5eab\u7684\u5378\u8f09\u547d\u4ee4\uff1a<\/p>\n<ul>\n<li><strong>MySQL\uff1a<\/strong>\n<pre><code>sudo apt-get remove mysql-server mysql-client mysql-common<\/code><\/pre>\n<\/li>\n<li><strong>PostgreSQL\uff1a<\/strong>\n<pre><code>sudo apt-get remove postgresql postgresql-contrib<\/code><\/pre>\n<\/li>\n<li><strong>MongoDB\uff1a<\/strong>\n<pre><code>sudo apt-get remove mongodb-org<\/code><\/pre>\n<\/li>\n<\/ul>\n<h3 id=\"4-%e6%b8%85%e7%90%86%e6%ae%98%e7%95%99%e6%96%87%e4%bb%b6-nIoUzLZvin\">4. \u6e05\u7406\u6b98\u7559\u6587\u4ef6<\/h3>\n<p>\u5378\u8f09\u5f8c\uff0c\u5efa\u8b70\u6aa2\u67e5\u4e26\u522a\u9664\u4efb\u4f55\u6b98\u7559\u7684\u914d\u7f6e\u6587\u4ef6\u6216\u6578\u64da\u6587\u4ef6\uff0c\u4ee5\u78ba\u4fdd\u7cfb\u7d71\u7684\u6574\u6f54\u3002<\/p>\n<pre><code>sudo rm -rf \/var\/lib\/mysql<\/code><\/pre>\n<h3 id=\"5-%e9%87%8d%e5%95%9f%e4%bc%ba%e6%9c%8d%e5%99%a8-nIoUzLZvin\">5. \u91cd\u555f\u4f3a\u670d\u5668<\/h3>\n<p>\u6700\u5f8c\uff0c\u91cd\u555f\u4f3a\u670d\u5668\u4ee5\u78ba\u4fdd\u6240\u6709\u66f4\u6539\u751f\u6548\u3002<\/p>\n<pre><code>sudo reboot<\/code><\/pre>\n<h2 id=\"%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a0%85-nIoUzLZvin\">\u6ce8\u610f\u4e8b\u9805<\/h2>\n<p>\u5728\u5378\u8f09\u6578\u64da\u5eab\u6642\uff0c\u8acb\u6ce8\u610f\u4ee5\u4e0b\u5e7e\u9ede\uff1a<\/p>\n<ul>\n<li>\u78ba\u4fdd\u60a8\u64c1\u6709\u8db3\u5920\u7684\u6b0a\u9650\u4f86\u57f7\u884c\u5378\u8f09\u64cd\u4f5c\u3002<\/li>\n<li>\u5728\u751f\u7522\u74b0\u5883\u4e2d\u9032\u884c\u5378\u8f09\u6642\uff0c\u61c9\u63d0\u524d\u901a\u77e5\u76f8\u95dc\u4eba\u54e1\uff0c\u4ee5\u907f\u514d\u696d\u52d9\u4e2d\u65b7\u3002<\/li>\n<li>\u5728\u5378\u8f09\u4e4b\u524d\uff0c\u52d9\u5fc5\u78ba\u8a8d\u5099\u4efd\u7684\u5b8c\u6574\u6027\u548c\u53ef\u7528\u6027\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b8%bd%e7%b5%90-nIoUzLZvin\">\u7e3d\u7d50<\/h2>\n<p>\u6b63\u78ba\u5378\u8f09\u6578\u64da\u5eab\u662f\u4e00\u9805\u91cd\u8981\u7684\u6280\u80fd\uff0c\u7121\u8ad6\u662f\u51fa\u65bc\u5347\u7d1a\u3001\u9077\u79fb\u9084\u662f\u5b89\u5168\u8003\u91cf\u3002\u901a\u904e\u9075\u5faa\u4e0a\u8ff0\u6b65\u9a5f\uff0c\u60a8\u53ef\u4ee5\u6709\u6548\u5730\u5378\u8f09\u6578\u64da\u5eab\uff0c\u4e26\u78ba\u4fdd\u7cfb\u7d71\u7684\u7a69\u5b9a\u6027\u548c\u5b89\u5168\u6027\u3002\u5982\u679c\u60a8\u9700\u8981\u66f4\u591a\u6709\u95dc\u4f3a\u670d\u5668\u7ba1\u7406\u7684\u8cc7\u8a0a\uff0c\u8acb\u8a2a\u554f\u6211\u5011\u7684\u7db2\u7ad9\uff0c\u4e86\u89e3\u66f4\u591a\u95dc\u65bc<a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a>\u548c<a href=\"https:\/\/server.hk\">\u96f2\u4f3a\u670d\u5668<\/a>\u7684\u89e3\u6c7a\u65b9\u6848\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3\u5982\u4f55\u6b63\u78ba\u5378\u8f09\u6578\u64da\u5eab2023\uff0c\u78ba\u4fdd\u6578\u64da\u5b89\u5168\u8207\u7cfb\u7d71\u7a69\u5b9a\uff0c\u907f\u514d\u5e38\u898b\u932f\u8aa4\uff0c\u63d0\u5347\u5378\u8f09\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-180038","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/180038","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=180038"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/180038\/revisions"}],"predecessor-version":[{"id":180039,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/180038\/revisions\/180039"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=180038"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=180038"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=180038"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}