\u547d\u4ee4<\/a>\u5b89\u88c5MySQL\u670d\u52a1\u5668\uff1a<\/p>\nsudoaptinstallmysql-server<\/p>\n
\u5728\u7279\u5b9a\u9636\u6bb5\uff0c\u9700\u5148\u884c\u8f93\u5165sudo\u5bc6\u7801\u4ee5\u53d6\u5f97\u64cd\u4f5c\u8bb8\u53ef\uff0c\u968f\u540e\u518d\u884c\u786e\u8ba4\u662f\u5426\u6267\u884c\u540e\u7eed\u6b65\u9aa4\u3002\u8f93\u5165\u540e\u6572\u51fb\u56de\u8f66\u4fbf\u53ef\u7acb\u523b\u5f00\u59cb\u5b89\u88c5\u8fdb\u7a0b\uff0c\u5c3d\u7ba1\u53ef\u80fd\u8017\u8d39\u4e00\u5b9a\u7684\u7b49\u5019\u65f6\u95f4\uff0c\u4f46\u8bf7\u5e7f\u5927\u7528\u6237\u4fdd\u6301\u8db3\u591f\u7684\u8010\u5fc3\u3002<\/p>\n
3.\u914d\u7f6eMySQL<\/b><\/p>\n
\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u542f\u52a8MySQL\u670d\u52a1\uff1a<\/p>\n
<\/p>\n
sudosystemctlstartmysql<\/p>\n
\u9996\u5148\uff0c\u9075\u5faa\u6b64\u6307\u4ee4\u5e76\u786e\u4fddMySQL\u5728\u7cfb\u7edf\u542f\u52a8\u65f6\u80fd\u81ea\u542f\uff1a<\/p>\n
sudosystemctlenablemysql<\/p>\n
\u4e3a\u786e\u4fddMySQL\u670d\u52a1\u5668\u7684\u5b89\u5168\u53ef\u9760\uff0c\u5f3a\u70c8\u5efa\u8bae\u90e8\u7f72\u7a33\u56fa\u7684\u5b89\u5168\u9632\u62a4\u673a\u5236\u3002<\/p>\n
\u6709\u5173MySQL\u7cfb\u7edf\u7ea7\u5b89\u5168\u8bbe\u7f6e\u8be6\u8ff0\u5982\u4e0b\uff1a\u9996\u5148\u9700\u6267\u884csudomysql_secure_installation\u6307\u4ee4\u3002<\/p>\n
\u672c\u6587\u6df1\u5165\u63a2\u8ba8\u4e86\u5982\u4f55\u5b9e\u65bd\u57fa\u7840\u5b89\u5168\u7a0b\u5e8f\u90e8\u7f72\uff0c\u5206\u522b\u6db5\u76d6\u8bbe\u7f6e\u521d\u59cb\u7528\u6237\u5bc6\u7801\u3001\u6d88\u9664\u533f\u540d\u8d26\u53f7\u53ca\u7981\u7528\u8fdc\u7a0broot\u767b\u9646\u7b49\u5173\u952e\u6b65\u9aa4ubuntu linux\uff0c\u4e25\u683c\u9075\u7167\u6307\u5bfc\u8fdb\u884c\uff0c\u5373\u53ef\u6210\u529f\u5b8c\u6210\u914d\u7f6e\u3002<\/p>\n
<\/p>\n
4.\u767b\u5f55\u548c\u7ba1\u7406MySQL<\/b><\/p>\n
\u73b0\u5728\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u767b\u5f55\u5230MySQL\u6570\u636e\u5e93\u670d\u52a1\u5668\uff1a<\/p>\n
mysql-uroot-p<\/p>\n
\u6210\u529f\u4ee5\u9884\u5148\u8bbe\u7f6e\u7684\u5bc6\u7801\u767b\u5f55\u81f3MySQL\u6570\u636e\u5e93\u670d\u52a1\u7cfb\u7edf\u4e4b\u540e\uff0c\u4fbf\u53ef\u5b9e\u65bd\u5bf9\u6570\u636e\u5e93\u3001\u7528\u6237\u53ca\u6388\u6743\u7b49\u91cd\u8981\u529f\u80fd\u7684\u7ba1\u7406\u4e0e\u64cd\u4f5c\u3002<\/p>\n
5.\u4f7f\u7528MySQL<\/b><\/p>\n
\u5728\u719f\u7ec3\u8fd0\u7528MySQL\u4e4b\u524d\uff0c\u52a1\u5fc5\u719f\u6089SQL\u57fa\u672c\u8bed\u6cd5\u89c4\u5219\u4e0e\u4e13\u7528\u6307\u4ee4\u3002\u5efa\u8bae\u67e5\u9605MySQL\u5b98\u65b9\u6307\u5357\u6216\u7f51\u7edc\u6559\u7a0b\uff0c\u638c\u63e1\u8868\u683c\u5efa\u7acb\u3001\u6570\u636e\u5f55\u5165\u4ee5\u53ca\u67e5\u8be2\u68c0\u7d22\u7b49\u57fa\u7840\u8981\u70b9\u3002<\/p>\n
\u5728\u65e5\u5e38\u7ef4\u62a4\u73af\u8282\uff0c\u6211\u4eec\u4f1a\u5b9e\u65bd\u5b9a\u671f\u7684\u6570\u636e\u5e93\u5907\u4efd\u4e0e\u6027\u80fd\u76d1\u63a7\uff0c\u5168\u9762\u4f18\u5316\u5404\u7c7b\u67e5\u8be2\u8bed\u53e5\uff0c\u81f4\u529b\u4e8e\u4e3a\u60a8\u63d0\u4f9b\u7a33\u5b9a\u4e14\u5b89\u5168\u7684\u6570\u636e\u5e93\u4f53\u9a8c\u3002<\/p>\n
6.\u5347\u7ea7\u548c\u5378\u8f7dMySQL<\/b><\/p>\n
\u968f\u7740\u6280\u672f\u7684\u53d1\u5c55\u8fdb\u6b65\uff0cMySQL\u65b0\u7248\u672c\u5373\u5c06\u9762\u4e16\u3002\u5728\u6b64\u671f\u95f4linux \u4e0b\u8f7d\u5b89\u88c5mysql<\/strong>\uff0c\u60a8\u53ef\u8fd0\u7528\u5305\u7ba1\u7406\u5de5\u5177\u5bf9\u73b0\u6709\u5b89\u88c5\u8fdb\u884c\u5347\u7ea7\uff0c\u4ee5\u786e\u4fdd\u786c\u4ef6\u8bbe\u65bd\u4e0e\u76f8\u5e94\u5e93\u5904\u4e8e\u6700\u65b0\u4e14\u7a33\u5b9a\u7684\u8fd0\u884c\u72b6\u6001\u3002<\/p>\n\u5982\u679c\u9700\u8981\u5378\u8f7dMySQL\u957f\u6625linux\u57f9\u8bad\uff0c\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5373\u53ef\u5b8c\u6210\u5378\u8f7d\uff1a<\/p>\n
\u8bf7\u501f\u52a9`sudoapt`\u547d\u4ee4\uff0c\u5b8c\u6210MySQL\u670d\u52a1\u5668\u7684\u5168\u9762\u5378\u8f7d\u4e0e\u6e05\u7406\u5de5\u4f5c\u3002<\/p>\n
sudoaptautoremove<\/p>\n
sudoaptautoclean<\/p>\n
\u5728\u60a8\u9009\u62e9\u5378\u8f7d\u8f6f\u4ef6\u4e4b\u524dlinux \u4e0b\u8f7d\u5b89\u88c5mysql<\/strong>\uff0c\u786e\u4fdd\u5df2\u5907\u4efd\u76f8\u5173\u6570\u636e\uff0c\u4ee5\u9632\u6b62\u4efb\u4f55\u4e0d\u5fc5\u8981\u7684\u635f\u5931\u3002\u53e6\u5916\uff0c\u4e25\u8c28\u5730\u6267\u884c\u5404\u9879\u64cd\u4f5c\uff0c\u907f\u514d\u6f5c\u5728\u98ce\u9669\uff0c\u51cf\u5c11\u65e0\u6cd5\u9006\u8f6c\u7684\u635f\u5931\u3002<\/p>\n7.\u5e38\u89c1\u95ee\u9898\u89e3\u51b3<\/b><\/p>\n
\u5728\u5b9e\u9645\u6267\u884c\u9636\u6bb5\uff0c\u6211\u4eec\u53ef\u80fd\u906d\u9047\u5404\u79cd\u56f0\u5883\uff0c\u5982\u6570\u636e\u94fe\u63a5\u6545\u969c\u3001\u6743\u9650\u8bef\u5224\u548c\u6027\u80fd\u4f4e\u4e0b\u7b49\u3002\u4e3a\u59a5\u5584\u5904\u7406\u8fd9\u4e9b\u95ee\u9898\uff0c\u60a8\u53ef\u9075\u5faa\u5982\u4e0b\u6b65\u9aa4\uff1a1\uff09\u67e5\u9605\u7cfb\u7edf\u65e5\u5fd7\uff1b2\uff09\u6821\u5bf9\u76f8\u5173\u914d\u7f6e\u6587\u4ef6\u4fe1\u606f\uff1b3\uff09\u5bfb\u6c42\u7ebf\u4e0a\u793e\u533a\u7684\u4e13\u4e1a\u63f4\u52a9\u3002<\/p>\n
\u5047\u5982\u9047\u5230\u96be\u9898\u65e0\u6cd5\u5316\u89e3\uff0c\u4e0d\u59a8\u8003\u8651\u6c42\u52a9\u4e8e\u4e13\u4e1a\u4eba\u5458\u6216\u5b98\u65b9\u673a\u6784\u3002<\/p>\n
\u672c\u7bc7\u6587\u7ae0\u5c06\u6df1\u5165\u6982\u62ec\u5982\u4f55\u5728Linux\u73af\u5883\u4e0b\u6210\u529f\u4e0b\u8f7d\u3001\u8bbe\u7f6e\u53ca\u4f7f\u7528MySQL\u7684\u6d41\u7a0b\uff0c\u540c\u65f6\u4e5f\u5c06\u4f1a\u8be6\u7ec6\u63a2\u8ba8\u7528\u4ee5\u89e3\u51b3\u53ef\u80fd\u51fa\u73b0\u7684\u5404\u79cd\u7591\u96be\u95ee\u9898\u53ca\u5b9e\u6218\u8fd0\u7528\u6280\u5de7\u3002\u901a\u8fc7\u4e25\u8c28\u800c\u7cfb\u7edf\u5316\u7684\u5b66\u4e60\u4e0e\u5b9e\u8df5\uff0c\u6211\u4eec\u76f8\u4fe1\u60a8\u5c06\u80fd\u591f\u719f\u7ec3\u638c\u63e1\u5229\u7528MySQL\u5728Linux\u73af\u5883\u4e0b\u8fdb\u884c\u9ad8\u6548\u7684\u6570\u636e\u5e93\u7ba1\u7406\u4e0e\u5f00\u53d1\u529f\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u8eab\u4e3a\u7cbe\u901aLinux\u7cfb\u7edf\u7684\u6280\u672f\u4e13\u5458\uff0c\u638c\u7ba1Linux\u73af\u5883\u4e0bMySQL\u7684\u5b89\u88c5\u4e0e\u8fd0\u7528\u4e43\u662f\u5fc5\u5907\u6280\u80fd\u3002\u672c\u7bc7\u6587\u7ae0\u5c06\u8be6\u7ec6\u9610\u8ff0\u5982\u4f55\u5728Linux\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u5b8c\u6210MySQL\u7684\u4e0b\u8f7d\u4e0e\u5b89\u88c5\u8fc7\u7a0b\uff0c\u4ee5\u53ca\u76f8\u5e94\u7684\u914d\u7f6e\u53ca\u5b9e\u7528\u6280\u5de7\u3002\u9996\u5148\uff0c\u6839\u636e\u9700\u6c42\u6311\u9009\u9002\u5408\u7684Linux\u53d1\u884c\u7248\u672c\u5e76\u642d\u914d\u76f8\u5e94\u7684\u8f6f\u4ef6\u5305\u7ba1\u7406\u5de5\u5177\u5c24\u4e3a\u5173\u952e\u3002<\/p>\n","protected":false},"author":1,"featured_media":290908,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-290907","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/290907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=290907"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/290907\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/290908"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=290907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=290907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=290907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}