{"id":171879,"date":"2024-11-07T08:26:15","date_gmt":"2024-11-07T00:26:15","guid":{"rendered":"https:\/\/server.hk\/cnblog\/171879\/"},"modified":"2024-11-07T08:26:16","modified_gmt":"2024-11-07T00:26:16","slug":"%e8%bc%95%e9%ac%86%e5%ad%b8%e7%bf%92%ef%bc%9a%e6%95%b8%e6%93%9a%e5%ba%ab2023%e7%9a%84%e5%ae%89%e8%a3%9d%e6%ad%a5%e9%a9%9f%e8%a9%b3%e8%a7%a3-%e6%80%8e%e9%ba%bc%e5%ae%89%e8%a3%9d%e6%95%b8%e6%93%9a","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/171879\/","title":{"rendered":"\u8f15\u9b06\u5b78\u7fd2\uff1a\u6578\u64da\u5eab2023\u7684\u5b89\u88dd\u6b65\u9a5f\u8a73\u89e3 (\u600e\u9ebc\u5b89\u88dd\u6578\u64da\u5eab2023)"},"content":{"rendered":"<h1 id=\"%e8%bc%95%e9%ac%86%e5%ad%b8%e7%bf%92%ef%bc%9a%e6%95%b8%e6%93%9a%e5%ba%ab2023%e7%9a%84%e5%ae%89%e8%a3%9d%e6%ad%a5%e9%a9%9f%e8%a9%b3%e8%a7%a3-%e6%80%8e%e9%ba%bc%e5%ae%89%e8%a3%9d%e6%95%b8%e6%93%9a-yhXUTQdgbj\">\u8f15\u9b06\u5b78\u7fd2\uff1a\u6578\u64da\u5eab2023\u7684\u5b89\u88dd\u6b65\u9a5f\u8a73\u89e3 (\u600e\u9ebc\u5b89\u88dd\u6578\u64da\u5eab2023)<\/h1>\n<p>\u5728\u7576\u4eca\u6578\u64da\u9a45\u52d5\u7684\u4e16\u754c\u4e2d\uff0c\u6578\u64da\u5eab\u7684\u5b89\u88dd\u548c\u7ba1\u7406\u8b8a\u5f97\u8d8a\u4f86\u8d8a\u91cd\u8981\u3002\u7121\u8ad6\u662f\u958b\u767c\u8005\u9084\u662f\u7cfb\u7d71\u7ba1\u7406\u54e1\uff0c\u638c\u63e1\u6578\u64da\u5eab\u7684\u5b89\u88dd\u6b65\u9a5f\u90fd\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u6280\u80fd\u3002\u672c\u6587\u5c07\u8a73\u7d30\u4ecb\u7d39\u5982\u4f55\u57282023\u5e74\u5b89\u88dd\u6578\u64da\u5eab\uff0c\u4e26\u63d0\u4f9b\u5be6\u7528\u7684\u6b65\u9a5f\u548c\u793a\u4f8b\uff0c\u5e6b\u52a9\u8b80\u8005\u8f15\u9b06\u4e0a\u624b\u3002<\/p>\n<h2 id=\"%e9%81%b8%e6%93%87%e5%90%88%e9%81%a9%e7%9a%84%e6%95%b8%e6%93%9a%e5%ba%ab%e7%ae%a1%e7%90%86%e7%b3%bb%e7%b5%b1-yhXUTQdgbj\">\u9078\u64c7\u5408\u9069\u7684\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71<\/h2>\n<p>\u5728\u958b\u59cb\u5b89\u88dd\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u9078\u64c7\u4e00\u500b\u5408\u9069\u7684\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\uff08DBMS\uff09\u3002\u76ee\u524d\u5e02\u5834\u4e0a\u6709\u591a\u7a2e\u9078\u64c7\uff0c\u5305\u62ec\uff1a<\/p>\n<ul>\n<li>MySQL<\/li>\n<li>PostgreSQL<\/li>\n<li>SQLite<\/li>\n<li>Microsoft SQL Server<\/li>\n<li>MongoDB<\/li>\n<\/ul>\n<p>\u6bcf\u7a2e\u6578\u64da\u5eab\u90fd\u6709\u5176\u7279\u9ede\u548c\u9069\u7528\u5834\u666f\uff0c\u9078\u64c7\u6642\u61c9\u6839\u64da\u5be6\u969b\u9700\u6c42\u9032\u884c\u8003\u91cf\u3002<\/p>\n<h2 id=\"%e5%ae%89%e8%a3%9d%e6%ad%a5%e9%a9%9f-yhXUTQdgbj\">\u5b89\u88dd\u6b65\u9a5f<\/h2>\n<h3 id=\"1-%e6%ba%96%e5%82%99%e7%92%b0%e5%a2%83-yhXUTQdgbj\">1. \u6e96\u5099\u74b0\u5883<\/h3>\n<p>\u5728\u5b89\u88dd\u6578\u64da\u5eab\u4e4b\u524d\uff0c\u78ba\u4fdd\u4f60\u7684\u7cfb\u7d71\u74b0\u5883\u7b26\u5408\u8981\u6c42\u3002\u4ee5MySQL\u70ba\u4f8b\uff0c\u4ee5\u4e0b\u662f\u57fa\u672c\u7684\u7cfb\u7d71\u8981\u6c42\uff1a<\/p>\n<ul>\n<li>\u64cd\u4f5c\u7cfb\u7d71\uff1aLinux\u3001Windows\u6216macOS<\/li>\n<li>\u5167\u5b58\uff1a\u81f3\u5c11512MB\uff08\u5efa\u8b701GB\u4ee5\u4e0a\uff09<\/li>\n<li>\u786c\u789f\u7a7a\u9593\uff1a\u81f3\u5c111GB\u7684\u53ef\u7528\u7a7a\u9593<\/li>\n<\/ul>\n<h3 id=\"2-%e4%b8%8b%e8%bc%89%e6%95%b8%e6%93%9a%e5%ba%ab%e5%ae%89%e8%a3%9d%e5%8c%85-yhXUTQdgbj\">2. \u4e0b\u8f09\u6578\u64da\u5eab\u5b89\u88dd\u5305<\/h3>\n<p>\u8a2a\u554f\u5b98\u65b9\u7db2\u7ad9\u4e0b\u8f09\u6700\u65b0\u7248\u672c\u7684\u6578\u64da\u5eab\u5b89\u88dd\u5305\u3002\u4f8b\u5982\uff0c\u5c0d\u65bcMySQL\uff0c\u53ef\u4ee5\u524d\u5f80<a href=\"https:\/\/dev.mysql.com\/downloads\/mysql\/\" rel=\"nofollow noopener\" target=\"_blank\">MySQL\u5b98\u65b9\u4e0b\u8f09\u9801\u9762<\/a>\u3002<\/p>\n<h3 id=\"3-%e5%ae%89%e8%a3%9d%e6%95%b8%e6%93%9a%e5%ba%ab-yhXUTQdgbj\">3. \u5b89\u88dd\u6578\u64da\u5eab<\/h3>\n<p>\u4ee5\u4e0b\u662f\u4ee5MySQL\u70ba\u4f8b\u7684\u5b89\u88dd\u6b65\u9a5f\uff1a<\/p>\n<pre><code>sudo apt update\nsudo apt install mysql-server\n<\/code><\/pre>\n<p>\u5b89\u88dd\u904e\u7a0b\u4e2d\uff0c\u7cfb\u7d71\u6703\u63d0\u793a\u4f60\u8a2d\u7f6eroot\u7528\u6236\u7684\u5bc6\u78bc\uff0c\u8acb\u52d9\u5fc5\u8a18\u4f4f\u9019\u500b\u5bc6\u78bc\u3002<\/p>\n<h3 id=\"4-%e9%85%8d%e7%bd%ae%e6%95%b8%e6%93%9a%e5%ba%ab-yhXUTQdgbj\">4. \u914d\u7f6e\u6578\u64da\u5eab<\/h3>\n<p>\u5b89\u88dd\u5b8c\u6210\u5f8c\uff0c\u9700\u8981\u9032\u884c\u57fa\u672c\u914d\u7f6e\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u9032\u884c\u5b89\u5168\u6027\u8a2d\u7f6e\uff1a<\/p>\n<pre><code>sudo mysql_secure_installation\n<\/code><\/pre>\n<p>\u9019\u500b\u547d\u4ee4\u6703\u5f15\u5c0e\u4f60\u5b8c\u6210\u4e00\u7cfb\u5217\u5b89\u5168\u8a2d\u7f6e\uff0c\u5305\u62ec\u79fb\u9664\u533f\u540d\u7528\u6236\u3001\u7981\u6b62root\u9060\u7a0b\u767b\u9304\u7b49\u3002<\/p>\n<h3 id=\"5-%e6%b8%ac%e8%a9%a6%e6%95%b8%e6%93%9a%e5%ba%ab-yhXUTQdgbj\">5. \u6e2c\u8a66\u6578\u64da\u5eab<\/h3>\n<p>\u914d\u7f6e\u5b8c\u6210\u5f8c\uff0c\u53ef\u4ee5\u901a\u904e\u4ee5\u4e0b\u547d\u4ee4\u767b\u9304\u5230MySQL\u6578\u64da\u5eab\uff0c\u6aa2\u67e5\u5b89\u88dd\u662f\u5426\u6210\u529f\uff1a<\/p>\n<pre><code>mysql -u root -p\n<\/code><\/pre>\n<p>\u8f38\u5165\u4e4b\u524d\u8a2d\u7f6e\u7684\u5bc6\u78bc\u5f8c\uff0c\u82e5\u80fd\u6210\u529f\u767b\u9304\uff0c\u5247\u8868\u793a\u5b89\u88dd\u6210\u529f\u3002<\/p>\n<h2 id=\"%e5%b8%b8%e8%a6%8b%e5%95%8f%e9%a1%8c%e8%a7%a3%e7%ad%94-yhXUTQdgbj\">\u5e38\u898b\u554f\u984c\u89e3\u7b54<\/h2>\n<h3 id=\"1-%e5%a6%82%e4%bd%95%e5%8d%b8%e8%bc%89%e6%95%b8%e6%93%9a%e5%ba%ab%ef%bc%9f-yhXUTQdgbj\">1. \u5982\u4f55\u5378\u8f09\u6578\u64da\u5eab\uff1f<\/h3>\n<p>\u5982\u679c\u9700\u8981\u5378\u8f09MySQL\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code>sudo apt remove mysql-server\n<\/code><\/pre>\n<h3 id=\"2-%e5%a6%82%e4%bd%95%e5%82%99%e4%bb%bd%e6%95%b8%e6%93%9a%e5%ba%ab%ef%bc%9f-yhXUTQdgbj\">2. \u5982\u4f55\u5099\u4efd\u6578\u64da\u5eab\uff1f<\/h3>\n<p>\u53ef\u4ee5\u4f7f\u7528mysqldump\u547d\u4ee4\u9032\u884c\u5099\u4efd\uff1a<\/p>\n<pre><code>mysqldump -u root -p database_name &gt; backup.sql\n<\/code><\/pre>\n<h2 id=\"%e7%b8%bd%e7%b5%90-yhXUTQdgbj\">\u7e3d\u7d50<\/h2>\n<p>\u5b89\u88dd\u6578\u64da\u5eab\u7684\u904e\u7a0b\u96d6\u7136\u770b\u4f3c\u7e41\u7463\uff0c\u4f46\u53ea\u8981\u6309\u7167\u6b65\u9a5f\u9032\u884c\uff0c\u5c31\u80fd\u8f15\u9b06\u5b8c\u6210\u3002\u7121\u8ad6\u662f\u9078\u64c7MySQL\u3001PostgreSQL\u9084\u662f\u5176\u4ed6\u6578\u64da\u5eab\u7cfb\u7d71\uff0c\u4e86\u89e3\u5176\u5b89\u88dd\u548c\u914d\u7f6e\u904e\u7a0b\u90fd\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u82e5\u60a8\u9700\u8981\u9032\u4e00\u6b65\u7684\u652f\u6301\u6216\u5c0b\u627e\u5408\u9069\u7684<a href=\"https:\/\/server.hk\">VPS<\/a>\u89e3\u6c7a\u65b9\u6848\uff0cServer.HK\u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\uff0c\u5e6b\u52a9\u60a8\u8f15\u9b06\u7ba1\u7406\u6578\u64da\u5eab\u548c\u61c9\u7528\u7a0b\u5e8f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8f15\u9b06\u5b78\u7fd2\u6578\u64da\u5eab2023\u7684\u5b89\u88dd\u6b65\u9a5f\u8a73\u89e3\uff0c\u63d0\u4f9b\u7c21\u55ae\u6613\u61c2\u7684\u6307\u5c0e\uff0c\u52a9\u4f60\u5feb\u901f\u5b8c\u6210\u5b89\u88dd\uff0c\u63d0\u5347\u6578\u64da\u7ba1\u7406\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-171879","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/171879","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=171879"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/171879\/revisions"}],"predecessor-version":[{"id":171880,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/171879\/revisions\/171880"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=171879"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=171879"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=171879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}