{"id":14186,"date":"2026-08-27T13:00:00","date_gmt":"2026-08-27T04:00:00","guid":{"rendered":"https:\/\/www.gigas-jp.com\/appnews\/?p=14186"},"modified":"2026-09-08T19:43:03","modified_gmt":"2026-09-08T10:43:03","slug":"wsl2%e3%81%aedocker%e7%92%b0%e5%a2%83%e3%81%a7mysql%e3%82%92laravel%e3%81%a8dbeaver%e3%81%8b%e3%82%89%e6%8e%a5%e7%b6%9a%e3%81%99%e3%82%8b%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.gigas-jp.com\/appnews\/archives\/14186","title":{"rendered":"WSL2\u306eDocker\u74b0\u5883\u3067MySQL\u3092Laravel\u3068DBeaver\u304b\u3089\u63a5\u7d9a\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>WSL2\u4e0a\u3067Laravel\u306e\u958b\u767a\u74b0\u5883\u3092Docker\u3067\u69cb\u7bc9\u3059\u308b\u5834\u5408\u3001MySQL\u3082Docker\u30b3\u30f3\u30c6\u30ca\u3067\u52d5\u304b\u3059\u69cb\u6210\u304c\u3088\u304f\u4f7f\u308f\u308c\u307e\u3059\u3002<\/p>\n<!-- \/wp:post-content -->\n\n<!-- wp:paragraph -->\n<p>\u4eca\u56de\u306f\u3001MySQL\u306e\u30dd\u30fc\u30c8\u3092\u300c3307\u300d\u306b\u5909\u66f4\u3057\u305f\u5834\u5408\u306b\u3001<br>WSL2\u5074\u306eLaravel\u3068Windows\u5074\u306eDBeaver\u304b\u3089\u63a5\u7d9a\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:heading {\"level\":4} -->\n<h4>Docker Compose\u306e\u8a2d\u5b9a<\/h4>\n<!-- \/wp:heading -->\n\n<!-- wp:paragraph -->\n<p>compose.yml\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>services:<br>app:<br>build: .<br>ports:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:list -->\n<ul><li>&#8220;8080:80&#8221;<br>depends_on:<\/li><li>db<\/li><\/ul>\n<!-- \/wp:list -->\n\n<!-- wp:paragraph -->\n<p>db:<br>image: mysql:8.0<br>environment:<br>MYSQL_DATABASE: laravel<br>MYSQL_USER: laravel<br>MYSQL_PASSWORD: password<br>MYSQL_ROOT_PASSWORD: root<br>ports:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:list -->\n<ul><li>&#8220;3307:3306&#8221;<\/li><\/ul>\n<!-- \/wp:list -->\n\n<!-- wp:paragraph -->\n<p>\u3053\u3053\u3067\u91cd\u8981\u306a\u306e\u304c\u3001<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>&#8220;3307:3306&#8221;<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u3068\u3044\u3046\u8a2d\u5b9a\u3067\u3059\u3002<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u5de6\u5074\u306e\u300c3307\u300d\u304c\u30db\u30b9\u30c8\u5074\u306e\u30dd\u30fc\u30c8\u3001<br>\u53f3\u5074\u306e\u300c3306\u300d\u304cMySQL\u30b3\u30f3\u30c6\u30ca\u5074\u306e\u30dd\u30fc\u30c8\u3067\u3059\u3002<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u3064\u307e\u308a\u3001<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>Windows \/ WSL2 \u2192 3307 \u2192 MySQL\u30b3\u30f3\u30c6\u30ca \u2192 3306<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u3068\u3044\u3046\u69cb\u6210\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:heading {\"level\":4} -->\n<h4>Laravel\u304b\u3089MySQL\u3078\u63a5\u7d9a<\/h4>\n<!-- \/wp:heading -->\n\n<!-- wp:paragraph -->\n<p>Laravel\u306fWSL2\u306eDocker\u30b3\u30f3\u30c6\u30ca\u5185\u3067\u52d5\u4f5c\u3057\u3066\u3044\u308b\u305f\u3081\u3001MySQL\u306e\u30b5\u30fc\u30d3\u30b9\u540d\u300cdb\u300d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>.env<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>DB_CONNECTION=mysql<br>DB_HOST=db<br>DB_PORT=3306<br>DB_DATABASE=laravel<br>DB_USERNAME=laravel<br>DB_PASSWORD=password<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u3053\u3053\u3067DB_PORT\u3092\u300c3307\u300d\u306b\u3057\u306a\u3044\u306e\u304c\u30dd\u30a4\u30f3\u30c8\u3067\u3059\u3002<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>Laravel\u3068MySQL\u306fDocker\u5185\u3067\u76f4\u63a5\u901a\u4fe1\u3059\u308b\u305f\u3081\u3001<br>Laravel\u304b\u3089\u898b\u305fMySQL\u306e\u30dd\u30fc\u30c8\u306f\u30b3\u30f3\u30c6\u30ca\u5074\u306e\u300c3306\u300d\u3067\u3059\u3002<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:heading {\"level\":4} -->\n<h4>Windows\u5074\u306eDBeaver\u304b\u3089\u63a5\u7d9a<\/h4>\n<!-- \/wp:heading -->\n\n<!-- wp:paragraph -->\n<p>Windows\u4e0a\u3067\u52d5\u4f5c\u3057\u3066\u3044\u308bDBeaver\u304b\u3089\u63a5\u7d9a\u3059\u308b\u5834\u5408\u306f\u3001<br>\u30db\u30b9\u30c8\u5074\u306b\u516c\u958b\u3057\u305f\u300c3307\u300d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>DBeaver\u306e\u8a2d\u5b9a\u4f8b\uff1a<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>Host : localhost<br>Port : 3307<br>Database : laravel<br>Username : laravel<br>Password : password<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>DBeaver\u304b\u3089\u306f\u3001<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>localhost:3307<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u306b\u63a5\u7d9a\u3059\u308b\u3068\u3001Docker\u30b3\u30f3\u30c6\u30ca\u306eMySQL\u300c3306\u300d\u3078\u63a5\u7d9a\u3055\u308c\u307e\u3059\u3002<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:heading {\"level\":4} -->\n<h4>\u307e\u3068\u3081<\/h4>\n<!-- \/wp:heading -->\n\n<!-- wp:paragraph -->\n<p>MySQL\u306e\u30dd\u30fc\u30c8\u30923307\u306b\u5909\u66f4\u3057\u305f\u5834\u5408\u3067\u3082\u3001<br>\u63a5\u7d9a\u5143\u306b\u3088\u3063\u3066\u6307\u5b9a\u3059\u308b\u30dd\u30fc\u30c8\u304c\u7570\u306a\u308a\u307e\u3059\u3002<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>Laravel<br>\u2192 DB_HOST=db<br>\u2192 DB_PORT=3306<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>Windows\u306eDBeaver<br>\u2192 Host=localhost<br>\u2192 Port=3307<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u300c3307:3306\u300d\u306e\u5de6\u5074\u306f\u30db\u30b9\u30c8\u5074\u3001<br>\u53f3\u5074\u306f\u30b3\u30f3\u30c6\u30ca\u5074\u306e\u30dd\u30fc\u30c8\u3067\u3059\u3002<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u305d\u306e\u305f\u3081\u3001Docker\u30b3\u30f3\u30c6\u30ca\u9593\u306e\u901a\u4fe1\u3067\u306f\u300c3306\u300d\u3001<br>Windows\u5074\u306eDBeaver\u304b\u3089\u63a5\u7d9a\u3059\u308b\u3068\u304d\u306f\u300c3307\u300d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>WSL2\uff0bDocker\u74b0\u5883\u3067MySQL\u306b\u63a5\u7d9a\u3067\u304d\u306a\u3044\u5834\u5408\u306f\u3001<br>\u307e\u305a\u300c\u3069\u3053\u304b\u3089MySQL\u3078\u63a5\u7d9a\u3057\u3066\u3044\u308b\u306e\u304b\u300d\u3068\u300c\u30db\u30b9\u30c8\u5074\u30fb\u30b3\u30f3\u30c6\u30ca\u5074\u306e\u3069\u3061\u3089\u306e\u30dd\u30fc\u30c8\u306a\u306e\u304b\u300d\u3092\u78ba\u8a8d\u3059\u308b\u3068\u3001\u539f\u56e0\u3092\u5207\u308a\u5206\u3051\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p>\u6728\u66dc\u65e5\u62c5\u5f53\uff1anishida<\/p><div class='wp_social_bookmarking_light'>        <div class=\"wsbl_google_plus_one\"><g:plusone size=\"medium\" annotation=\"none\" href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/14186\" ><\/g:plusone><\/div>        <div class=\"wsbl_hatena_button\"><a href=\"\/\/b.hatena.ne.jp\/entry\/https:\/\/www.gigas-jp.com\/appnews\/archives\/14186\" class=\"hatena-bookmark-button\" data-hatena-bookmark-title=\"WSL2\u306eDocker\u74b0\u5883\u3067MySQL\u3092Laravel\u3068DBeaver\u304b\u3089\u63a5\u7d9a\u3059\u308b\u65b9\u6cd5\" data-hatena-bookmark-layout=\"standard\" title=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\"> <img loading=\"lazy\" decoding=\"async\" src=\"\/\/b.hatena.ne.jp\/images\/entry-button\/button-only@2x.png\" alt=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\" width=\"20\" height=\"20\" style=\"border: none;\" \/><\/a><script type=\"text\/javascript\" src=\"\/\/b.hatena.ne.jp\/js\/bookmark_button.js\" charset=\"utf-8\" async=\"async\"><\/script><\/div>        <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/14186\" data-text=\"WSL2\u306eDocker\u74b0\u5883\u3067MySQL\u3092Laravel\u3068DBeaver\u304b\u3089\u63a5\u7d9a\u3059\u308b\u65b9\u6cd5\" data-via=\"GIGASJAPAN_APPS\" data-lang=\"ja\">Tweet<\/a><\/div>        <div class=\"wsbl_facebook_like\"><div id=\"fb-root\"><\/div><fb:like href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/14186\" layout=\"button_count\" action=\"like\" width=\"100\" share=\"false\" show_faces=\"false\" ><\/fb:like><\/div>        <div class=\"wsbl_facebook_send\"><div id=\"fb-root\"><\/div><fb:send href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/14186\" colorscheme=\"light\" ><\/fb:send><\/div><\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>WSL2\u4e0a\u3067Laravel\u306e\u958b\u767a\u74b0\u5883\u3092Docker\u3067\u69cb\u7bc9\u3059\u308b\u5834\u5408\u3001MySQL\u3082Docker\u30b3\u30f3\u30c6\u30ca\u3067\u52d5\u304b\u3059\u69cb\u6210\u304c\u3088\u304f\u4f7f\u308f\u308c\u307e\u3059\u3002 \u4eca\u56de\u306f\u3001MySQL\u306e\u30dd\u30fc\u30c8\u3092\u300c3307\u300d\u306b\u5909\u66f4\u3057\u305f\u5834\u5408\u306b\u3001WSL2\u5074\u306eLaravel\u3068Wi [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[96],"tags":[],"class_list":["post-14186","post","type-post","status-publish","format-standard","hentry","category-ai"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/14186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/comments?post=14186"}],"version-history":[{"count":1,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/14186\/revisions"}],"predecessor-version":[{"id":14187,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/14186\/revisions\/14187"}],"wp:attachment":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/media?parent=14186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/categories?post=14186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/tags?post=14186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}