{"id":1224,"date":"2019-03-16T21:38:09","date_gmt":"2019-03-16T12:38:09","guid":{"rendered":"https:\/\/blog.minatoproject.com\/?p=1224"},"modified":"2020-02-07T22:34:16","modified_gmt":"2020-02-07T13:34:16","slug":"%e3%80%90docker%e3%80%91mysql%e3%82%92%e3%82%a2%e3%83%83%e3%83%97%e3%82%b0%e3%83%ac%e3%83%bc%e3%83%89%e3%81%97%e3%81%9f%e3%82%89%e3%83%8f%e3%83%9e%e3%81%a3%e3%81%9f%e8%a9%b1","status":"publish","type":"post","link":"https:\/\/blog.minatoproject.com\/?p=1224","title":{"rendered":"\u3010Docker\u3011MySQL\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u305f\u3089\u30cf\u30de\u3063\u305f\u8a71"},"content":{"rendered":"<div class=\"veu_autoEyeCatchBox\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/03\/20190316_eyecatch-1024x576.png\" class=\"attachment-large size-large wp-post-image\" alt=\"\" srcset=\"https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/03\/20190316_eyecatch-1024x576.png 1024w, https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/03\/20190316_eyecatch-300x169.png 300w, https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/03\/20190316_eyecatch-768x432.png 768w, https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/03\/20190316_eyecatch-320x180.png 320w, https:\/\/blog.minatoproject.com\/wp-content\/uploads\/2019\/03\/20190316_eyecatch.png 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div>\n<p>Jenkins\u3067\u30b3\u30f3\u30c6\u30ca\u3067\u306e\u5206\u6563\u30d3\u30eb\u30c9\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306bDocker\u306e\u63a5\u7d9a\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u305f\u3089\u30c7\u30fc\u30e2\u30f3\u304c\u8d77\u52d5\u3057\u306a\u304f\u306a\u3063\u3066Docker\u3092\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066docker-compose\u3092\u7acb\u3061\u4e0a\u3052\u305f\u3089\u3053\u306e\u30d6\u30ed\u30b0\u30c7\u30fc\u30bf\u304c\u5165\u3063\u3066\u3044\u308bMySQL\u30b3\u30f3\u30c6\u30ca\u304c\u7acb\u3061\u4e0a\u304c\u3089\u306a\u304f\u306a\u3063\u3066\u3068\u3044\u3046\u3078\u3063\u307d\u3053\u30a8\u30f3\u30b8\u30cb\u30a2\u7279\u6709\u306e\u8ca0\u306e\u30b9\u30d1\u30a4\u30e9\u30eb\u3092\u7e70\u308a\u8fd4\u3057\u3066\u3057\u307e\u3063\u305f\u306e\u3067\u5099\u5fd8\u9332\u3068\u3057\u3066\u6b8b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30a8\u30e9\u30fc\u5185\u5bb9<\/h2>\n\n\n\n<p>WordPress\u5074\u306e\u30ed\u30b0\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5185\u5bb9\u304c\u5927\u91cf\u306b\u51fa\u529b\u3055\u308c\u3066\u3044\u305f\u306e\u304c\u6c7a\u5b9a\u6253\u3068\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism off-numbers lang-plane\"><code>Warning: mysqli::__construct(): The server requested authentication method unknown to the client [caching_sha2_password] in Standard input code on line 22<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u30bf\u30cd\u660e\u304b\u3057<\/h2>\n\n\n\n<p>MySQL\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30928.0\u307e\u3067\u4e0a\u3052\u3066\u3057\u307e\u3063\u305f\u306e\u304c\u539f\u56e0\u3067\u3057\u305f\u3002\u3069\u3046\u3084\u30898.0\u304b\u3089\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30e6\u30fc\u30b6\u8a8d\u8a3c\u65b9\u5f0f\u304c\u5909\u308f\u3063\u305f\u3088\u3046\u3067\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3067\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u307f\u305f\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5bfe\u7b56<\/h2>\n\n\n\n<p>\u4f55\u306e\u637b\u308a\u3082\u3042\u308a\u307e\u305b\u3093\u304c\u30d1\u30b9\u30ef\u30fc\u30c9\u306b\u3088\u308b\u30ed\u30b0\u30a4\u30f3\u3092\u8a31\u53ef\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u307e\u305a <code>docker-compose.yml<\/code> \u306b <code>command<\/code> \u3092\u8ffd\u8a18\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plane\" data-file=\"docker-compose.yml\"><code>  wpmysql:\n    image: mysql:8.0\n    container_name: WordPressDB\n    command: &#39;--default-authentication-plugin=mysql_native_password&#39;\n    privileged: true\n    restart: always\n    # \u4ee5\u4e0b\u7565<\/code><\/pre><\/div>\n\n\n\n<p>\u30b3\u30f3\u30c6\u30ca\u3092\u8d77\u52d5\u3057\u3066MySQL\u306b\u30ed\u30b0\u30a4\u30f3\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism off-numbers lang-plane\"><code>$ docker exec -it WordPressDB \/bin\/bash<\/code><\/pre><\/div>\n\n\n\n<p>DB\u306b\u63a5\u7d9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism off-numbers lang-plane\"><code>$ mysql -u root -p<\/code><\/pre><\/div>\n\n\n\n<p>WordPress\u30e6\u30fc\u30b6\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism off-numbers lang-plane\"><code>mysql&gt; alter user &#39;USERNAME&#39;@&#39;%&#39; identified with mysql_native_password by &#39;PASSWORD&#39;;<\/code><\/pre><\/div>\n\n\n\n<p>\u3053\u308c\u3067WordPress\u304c\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3081\u3067\u305f\u3057\u3081\u3067\u305f\u3057\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Jenkins\u3067\u30b3\u30f3\u30c6\u30ca\u3067\u306e\u5206\u6563\u30d3\u30eb\u30c9\u3092\u5b9f\u884c\u3059\u308b\u305f\u3081\u306bDocker\u306e\u63a5\u7d9a\u8a2d\u5b9a\u3092\u5909\u66f4\u3057\u305f\u3089\u30c7\u30fc\u30e2\u30f3\u304c\u8d77\u52d5\u3057\u306a\u304f\u306a\u3063\u3066Docker\u3092\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066docker-compose\u3092\u7acb\u3061\u4e0a\u3052\u305f\u3089\u3053\u306e\u30d6\u30ed\u30b0\u30c7\u30fc\u30bf\u304c\u5165\u3063\u3066\u3044\u308bMy [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1592,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"vkexunit_cta_each_option":"","footnotes":""},"categories":[17,4],"tags":[],"class_list":["post-1224","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-docker","category-linux"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/posts\/1224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1224"}],"version-history":[{"count":9,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/posts\/1224\/revisions"}],"predecessor-version":[{"id":1780,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/posts\/1224\/revisions\/1780"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=\/wp\/v2\/media\/1592"}],"wp:attachment":[{"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.minatoproject.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}