{"id":26958,"date":"2023-05-24T21:18:13","date_gmt":"2023-11-21T10:52:22","guid":{"rendered":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%b0%86-mysql-%e5%ae%89%e8%a3%85%e5%88%b0-nginx-%e9%95%9c%e5%83%8f%e6%97%b6%e9%9c%80%e8%a6%81%e6%b3%a8%e6%84%8f%e7%9a%84%e4%ba%8b%e9%a1%b9-2\/"},"modified":"2025-08-11T23:59:57","modified_gmt":"2025-08-11T15:59:57","slug":"%e5%9c%a8%e5%b0%86-mysql-%e5%ae%89%e8%a3%85%e5%88%b0-nginx-%e9%95%9c%e5%83%8f%e6%97%b6%e9%9c%80%e8%a6%81%e6%b3%a8%e6%84%8f%e7%9a%84%e4%ba%8b%e9%a1%b9-2","status":"publish","type":"post","link":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%b0%86-mysql-%e5%ae%89%e8%a3%85%e5%88%b0-nginx-%e9%95%9c%e5%83%8f%e6%97%b6%e9%9c%80%e8%a6%81%e6%b3%a8%e6%84%8f%e7%9a%84%e4%ba%8b%e9%a1%b9-2\/","title":{"rendered":"\u5728\u5c06 MySQL \u5b89\u88c5\u5230 nginx \u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879"},"content":{"rendered":"<h2>\u76ee\u6807<\/h2>\n<p>\u5728\u4f7f\u7528Docker\u73af\u5883\u4e0b\uff0c\u5c1d\u8bd5\u5728nginx\u7684\u5b98\u65b9\u955c\u50cf\u4e2d\u5b89\u88c5MySQL\u5ba2\u6237\u7aef\u9047\u5230\u56f0\u96be\u7684\u4eba\u3002<\/p>\n<h3>\u8c03\u67e5\u548c\u89e3\u51b3<\/h3>\n<p>\u53ef\u4ee5\u901a\u8fc7\u4e0a\u8ff0\u94fe\u63a5\u786e\u8ba4\uff0c\u5b98\u65b9\u7684image\u4f7f\u7528\u7684\u662fFROM debian:buster-slim\u3002<br \/>\n\u6211\u53d1\u73b0\u57fa\u7840\u955c\u50cf\u662fdebian\uff0c\u6240\u4ee5\u6211\u53bb\u67e5\u770b\u4e86https:\/\/hub.docker.com\/_\/debian\uff0c<br \/>\n\u5f97\u77e5buster-slim\u662fdebian 10\u7cfb\u5217\u3002<\/p>\n<p>\u7531\u4e8eBuster\u7cfb\u4e2d\u4e0d\u5b58\u5728mysql-client\uff0c\u56e0\u6b64\u4f7f\u7528default-mysql-server\u8fdb\u884c\u5b89\u88c5\u3002<\/p>\n<pre class=\"post-pre\"><code><span class=\"nv\">$ <\/span><span class=\"nb\">sudo <\/span>apt-get update\r\n<span class=\"nv\">$ <\/span><span class=\"nb\">sudo <\/span>apt-get <span class=\"nb\">install <\/span>default-mysql-server\r\n<\/code><\/pre>\n<p>\u8fd9\u6837\u5c31\u53ef\u4ee5\u8fdb\u53bb\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u6807 \u5728\u4f7f\u7528Docker\u73af\u5883\u4e0b\uff0c\u5c1d\u8bd5\u5728nginx\u7684\u5b98\u65b9\u955c\u50cf\u4e2d\u5b89\u88c5MySQL\u5ba2\u6237\u7aef\u9047\u5230\u56f0\u96be\u7684\u4eba\u3002 \u8c03\u67e5\u548c\u89e3\u51b3 \u53ef [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[227],"class_list":["post-26958","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-227"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.5 (Yoast SEO v21.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5728\u5c06 MySQL \u5b89\u88c5\u5230 nginx \u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879 - Blog - Silicon Cloud<\/title>\n<meta name=\"description\" content=\"\u5173\u4e8e\u5728\u5c06 MySQL \u5b89\u88c5\u5230 nginx \u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5728\u5c06-mysql-\u5b89\u88c5\u5230-nginx-\u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879-2\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5728\u5c06 MySQL \u5b89\u88c5\u5230 nginx \u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879\" \/>\n<meta property=\"og:description\" content=\"\u5173\u4e8e\u5728\u5c06 MySQL \u5b89\u88c5\u5230 nginx \u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879\u7684\u6280\u672f\u6587\u7ae0\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.silicloud.com\/zh\/blog\/\u5728\u5c06-mysql-\u5b89\u88c5\u5230-nginx-\u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Blog - Silicon Cloud\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-21T10:52:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-08-11T15:59:57+00:00\" \/>\n<meta name=\"author\" content=\"\u9038, \u79d1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u9038, \u79d1\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%b0%86-mysql-%e5%ae%89%e8%a3%85%e5%88%b0-nginx-%e9%95%9c%e5%83%8f%e6%97%b6%e9%9c%80%e8%a6%81%e6%b3%a8%e6%84%8f%e7%9a%84%e4%ba%8b%e9%a1%b9-2\/\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%b0%86-mysql-%e5%ae%89%e8%a3%85%e5%88%b0-nginx-%e9%95%9c%e5%83%8f%e6%97%b6%e9%9c%80%e8%a6%81%e6%b3%a8%e6%84%8f%e7%9a%84%e4%ba%8b%e9%a1%b9-2\/\",\"name\":\"\u5728\u5c06 MySQL \u5b89\u88c5\u5230 nginx \u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879 - Blog - Silicon Cloud\",\"isPartOf\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\"},\"datePublished\":\"2023-11-21T10:52:22+00:00\",\"dateModified\":\"2025-08-11T15:59:57+00:00\",\"author\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487\"},\"description\":\"\u5173\u4e8e\u5728\u5c06 MySQL \u5b89\u88c5\u5230 nginx \u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879\u7684\u6280\u672f\u6587\u7ae0\",\"breadcrumb\":{\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%b0%86-mysql-%e5%ae%89%e8%a3%85%e5%88%b0-nginx-%e9%95%9c%e5%83%8f%e6%97%b6%e9%9c%80%e8%a6%81%e6%b3%a8%e6%84%8f%e7%9a%84%e4%ba%8b%e9%a1%b9-2\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%b0%86-mysql-%e5%ae%89%e8%a3%85%e5%88%b0-nginx-%e9%95%9c%e5%83%8f%e6%97%b6%e9%9c%80%e8%a6%81%e6%b3%a8%e6%84%8f%e7%9a%84%e4%ba%8b%e9%a1%b9-2\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%b0%86-mysql-%e5%ae%89%e8%a3%85%e5%88%b0-nginx-%e9%95%9c%e5%83%8f%e6%97%b6%e9%9c%80%e8%a6%81%e6%b3%a8%e6%84%8f%e7%9a%84%e4%ba%8b%e9%a1%b9-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.silicloud.com\/zh\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5728\u5c06 MySQL \u5b89\u88c5\u5230 nginx \u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#website\",\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/\",\"name\":\"Blog - Silicon Cloud\",\"description\":\"\",\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487\",\"name\":\"\u9038, \u79d1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g\",\"caption\":\"\u9038, \u79d1\"},\"url\":\"https:\/\/www.silicloud.com\/zh\/blog\/author\/keyi\/\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%b0%86-mysql-%e5%ae%89%e8%a3%85%e5%88%b0-nginx-%e9%95%9c%e5%83%8f%e6%97%b6%e9%9c%80%e8%a6%81%e6%b3%a8%e6%84%8f%e7%9a%84%e4%ba%8b%e9%a1%b9-2\/#local-main-organization-logo\",\"url\":\"\",\"contentUrl\":\"\",\"caption\":\"Blog - Silicon Cloud\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"\u5728\u5c06 MySQL \u5b89\u88c5\u5230 nginx \u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879 - Blog - Silicon Cloud","description":"\u5173\u4e8e\u5728\u5c06 MySQL \u5b89\u88c5\u5230 nginx \u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879\u7684\u6280\u672f\u6587\u7ae0","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.silicloud.com\/zh\/blog\/\u5728\u5c06-mysql-\u5b89\u88c5\u5230-nginx-\u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879-2\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5728\u5c06 MySQL \u5b89\u88c5\u5230 nginx \u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879","og_description":"\u5173\u4e8e\u5728\u5c06 MySQL \u5b89\u88c5\u5230 nginx \u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879\u7684\u6280\u672f\u6587\u7ae0","og_url":"https:\/\/www.silicloud.com\/zh\/blog\/\u5728\u5c06-mysql-\u5b89\u88c5\u5230-nginx-\u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879-2\/","og_site_name":"Blog - Silicon Cloud","article_published_time":"2023-11-21T10:52:22+00:00","article_modified_time":"2025-08-11T15:59:57+00:00","author":"\u9038, \u79d1","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u9038, \u79d1","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%b0%86-mysql-%e5%ae%89%e8%a3%85%e5%88%b0-nginx-%e9%95%9c%e5%83%8f%e6%97%b6%e9%9c%80%e8%a6%81%e6%b3%a8%e6%84%8f%e7%9a%84%e4%ba%8b%e9%a1%b9-2\/","url":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%b0%86-mysql-%e5%ae%89%e8%a3%85%e5%88%b0-nginx-%e9%95%9c%e5%83%8f%e6%97%b6%e9%9c%80%e8%a6%81%e6%b3%a8%e6%84%8f%e7%9a%84%e4%ba%8b%e9%a1%b9-2\/","name":"\u5728\u5c06 MySQL \u5b89\u88c5\u5230 nginx \u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879 - Blog - Silicon Cloud","isPartOf":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website"},"datePublished":"2023-11-21T10:52:22+00:00","dateModified":"2025-08-11T15:59:57+00:00","author":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487"},"description":"\u5173\u4e8e\u5728\u5c06 MySQL \u5b89\u88c5\u5230 nginx \u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879\u7684\u6280\u672f\u6587\u7ae0","breadcrumb":{"@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%b0%86-mysql-%e5%ae%89%e8%a3%85%e5%88%b0-nginx-%e9%95%9c%e5%83%8f%e6%97%b6%e9%9c%80%e8%a6%81%e6%b3%a8%e6%84%8f%e7%9a%84%e4%ba%8b%e9%a1%b9-2\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%b0%86-mysql-%e5%ae%89%e8%a3%85%e5%88%b0-nginx-%e9%95%9c%e5%83%8f%e6%97%b6%e9%9c%80%e8%a6%81%e6%b3%a8%e6%84%8f%e7%9a%84%e4%ba%8b%e9%a1%b9-2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%b0%86-mysql-%e5%ae%89%e8%a3%85%e5%88%b0-nginx-%e9%95%9c%e5%83%8f%e6%97%b6%e9%9c%80%e8%a6%81%e6%b3%a8%e6%84%8f%e7%9a%84%e4%ba%8b%e9%a1%b9-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.silicloud.com\/zh\/blog\/"},{"@type":"ListItem","position":2,"name":"\u5728\u5c06 MySQL \u5b89\u88c5\u5230 nginx \u955c\u50cf\u65f6\u9700\u8981\u6ce8\u610f\u7684\u4e8b\u9879"}]},{"@type":"WebSite","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#website","url":"https:\/\/www.silicloud.com\/zh\/blog\/","name":"Blog - Silicon Cloud","description":"","inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/85c1dae56e6ea1e695c73d33c684d487","name":"\u9038, \u79d1","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c94f6d9cbbfbca863fab309840bd690c153c95f8490c290ad2ed54dd693dad16?s=96&d=mm&r=g","caption":"\u9038, \u79d1"},"url":"https:\/\/www.silicloud.com\/zh\/blog\/author\/keyi\/"},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.silicloud.com\/zh\/blog\/%e5%9c%a8%e5%b0%86-mysql-%e5%ae%89%e8%a3%85%e5%88%b0-nginx-%e9%95%9c%e5%83%8f%e6%97%b6%e9%9c%80%e8%a6%81%e6%b3%a8%e6%84%8f%e7%9a%84%e4%ba%8b%e9%a1%b9-2\/#local-main-organization-logo","url":"","contentUrl":"","caption":"Blog - Silicon Cloud"}]}},"_links":{"self":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/26958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/comments?post=26958"}],"version-history":[{"count":2,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/26958\/revisions"}],"predecessor-version":[{"id":56187,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/posts\/26958\/revisions\/56187"}],"wp:attachment":[{"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/media?parent=26958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/categories?post=26958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.silicloud.com\/zh\/blog\/wp-json\/wp\/v2\/tags?post=26958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}