{"id":1488,"date":"2021-07-17T18:36:40","date_gmt":"2021-07-17T09:36:40","guid":{"rendered":"http:\/\/www.agile-software.site\/?p=1488"},"modified":"2022-12-11T07:34:09","modified_gmt":"2022-12-10T22:34:09","slug":"mysql","status":"publish","type":"post","link":"https:\/\/agile-software.net\/?p=1488","title":{"rendered":"MySQL"},"content":{"rendered":"\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u30c7\u30fc\u30bf\u3092\u84c4\u7a4d\u3057\u3066\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u3002<br>\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3067\u30c7\u30fc\u30bf\u7ba1\u7406\u3067\u304d\u308b\u306e\u306f\u3042\u308b\u7a0b\u5ea6\u30b7\u30f3\u30d7\u30eb\u306a\u30c7\u30fc\u30bf\u3092\u30b7\u30f3\u30d7\u30eb\u306b\u51e6\u7406\u3059\u308b\u5834\u5408\u306e\u307f\u3067\u3059\u3002<br>\u3042\u308b\u7a0b\u5ea6\u8907\u96d1\u306a\u3053\u3068\u3092\u3055\u305b\u3088\u3046\u3068\u601d\u3063\u305f\u3089\u3001\u3084\u306f\u308a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u5229\u7528\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u3044\u3046\u306e\u306f\u591a\u6570\u5b58\u5728\u3057\u307e\u3059\u304c\u3001\u5927\u304d\u304f2\u3064\u306b\u5206\u3051\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br>\u305d\u308c\u306fSQL\u5bfe\u5fdc\u304b\u3001\u305d\u3046\u3067\u306a\u3044\u304b\u3067\u3059\u3002<\/p>\n\n\n\n<p>SQL\u5bfe\u5fdc\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306fSQL\u3068\u3044\u3046\u8a00\u8a9e\u3092\u4f7f\u3063\u3066\u547d\u4ee4\u6587\u3092\u4f5c\u308a\u3001\u305d\u308c\u3092\u5b9f\u884c\u3057\u3066\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u64cd\u4f5c\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>SQL\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u306a\u3044\u300c\u975eSQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u300d\u306fSQL\u306e\u3088\u3046\u306a\u8a00\u8a9e\u3092\u6301\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u5358\u7d14\u306a\u64cd\u4f5c\u3057\u304b\u3067\u304d\u307e\u305b\u3093\u304c\u3081\u3061\u3083\u304f\u3061\u3083\u901f\u3044\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">MySQL<\/h2>\n\n\n\n<p>SQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u4e2d\u3067\u6700\u3082\u5e45\u5e83\u304f\u4f7f\u308f\u308c\u3066\u3044\u308b\u306e\u304cMySQL\u3067\u3059\u3002<br>XAMPP\u306b\u3082SQL\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u304c\u300cMariaDB\u300d\u3067\u3059\u3002<br>MariaDB\u306f\u307b\u307cMySQL\u3067\u3059\u3002<\/p>\n\n\n\n<p>MySQL\u3068\u3044\u3046\u306e\u306f\u30b5\u30fc\u30d0\u30fc\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3059\u3002<br>Web\u30b5\u30fc\u30d0\u30fc\u3068\u540c\u3058\u3088\u3046\u306b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b5\u30fc\u30d0\u30fc\u3068\u3057\u3066\u4f5c\u6210\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3059\u3002<br>Web\u30b5\u30fc\u30d0\u30fc\u304cWeb\u30d6\u30e9\u30a6\u30b6\u304b\u3089\u30b5\u30fc\u30d0\u30fc\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066Web\u30da\u30fc\u30b8\u3092\u8868\u793a\u3059\u308b\u306e\u3068\u540c\u3058\u3088\u3046\u306b\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b5\u30fc\u30d0\u30fc\u306f\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u4e2d\u304b\u3089\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u30b5\u30fc\u30d0\u30fc\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u30c7\u30fc\u30bf\u3092\u53d7\u3051\u53d6\u308b\u306e\u3067\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">phpMyAdmin<\/h2>\n\n\n\n<p>XAMPP\u306f\u7c21\u5358\u306bMySQL\u3092\u5229\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u306e\u30c4\u30fc\u30eb\u3092\u7528\u610f\u3057\u3066\u304a\u3044\u3066\u304f\u308c\u3066\u3044\u307e\u3059\u3002<br>\u305d\u308c\u304c\u300cphpMyAdmin\u300d\u3068\u3044\u3046\u3082\u306e\u3067\u3059\u3002<br>\u3053\u306ephpMyAdmin\u306fWeb\u30a2\u30d7\u30ea\u3067\u3059\u3002<br>XAMPP\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3068\u6a19\u6e96\u3067\u7d44\u307f\u8fbc\u307e\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>http:\/\/localhost\/phpmyadmin\/<\/code><\/pre><\/div>\n\n\n\n<p>MySQL\u306b\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30ea\u30b9\u30c8\u3067\u3059\u3002<br>MySQL\u3067\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u8907\u6570\u6301\u3064\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\n<ul class=\"wp-block-list\">\n<li>\u30c7\u30fc\u30bf\u3092\u6271\u3046\u305f\u3081\u306b\u306f\u3001\u307e\u305a\u305d\u306e\u305f\u3081\u306e\u300c\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u300d\u3092\u7528\u610f\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u30c6\u30fc\u30d6\u30eb\n<ul class=\"wp-block-list\">\n<li>\u30c7\u30fc\u30bf\u3092\u4fdd\u7ba1\u3059\u308b\u305f\u3081\u306e\u3082\u306e\u3067\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u30ab\u30e9\u30e0\n<ul class=\"wp-block-list\">\n<li>\u30c6\u30fc\u30d6\u30eb\u306b\u306f\u4fdd\u7ba1\u3059\u308b\u5024\u306e\u540d\u524d\u3084\u9152\u985e\u306a\u3069\u3092\u5b9a\u7fa9\u3057\u305f\u9805\u76ee\u3092\u7528\u610f\u3057\u3066\u3044\u304d\u307e\u3059\u3002<br>\u4f8b\u3048\u3070\u4f4f\u6240\u9332\u30c6\u30fc\u30d6\u30eb\u306a\u3089\u300c\u540d\u524d\u300d\u300c\u4f4f\u6240\u300d\u300c\u96fb\u8a71\u756a\u53f7\u300d\u3068\u3044\u3063\u305f\u9805\u76ee\u304c\u5fc5\u8981\u306b\u306a\u308a\u307e\u3059\u3002<br>\u3053\u306e\u9805\u76ee\u306e\u3053\u3068\u3092\u30ab\u30e9\u30e0\u3068\u3044\u3044\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u30ec\u30b3\u30fc\u30c9\n<ul class=\"wp-block-list\">\n<li>\u30c6\u30fc\u30d6\u30eb\u306b\u4fdd\u7ba1\u3059\u308b1\u30641\u3064\u306e\u30c7\u30fc\u30bf\u306e\u3053\u3068\u3067\u3059\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">SQL\u30d5\u30a1\u30a4\u30eb\u30a4\u30f3\u30dd\u30fc\u30c8<\/h2>\n\n\n\n<p>\u30a4\u30f3\u30dd\u30fc\u30c8\u30bf\u30d6\u304b\u3089\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"605\" src=\"https:\/\/www.agile-software.site\/wp-content\/uploads\/2022\/12\/phpmyadmin-1024x605.jpg\" alt=\"\" class=\"wp-image-2320\" srcset=\"https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/phpmyadmin-1024x605.jpg 1024w, https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/phpmyadmin-300x177.jpg 300w, https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/phpmyadmin-768x453.jpg 768w, https:\/\/agile-software.net\/wp-content\/uploads\/2022\/12\/phpmyadmin.jpg 1494w, https:\/\/www.agile-software.site\/wp-content\/uploads\/2022\/12\/phpmyadmin-1024x605.jpg 856w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>SQLite\u306e\u30e1\u30ea\u30c3\u30c8<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30fb\u30c7\u30fc\u30bf\u30d5\u30a1\u30a4\u30eb\u304c\u3072\u3068\u3064<\/li>\n\n\n\n<li>\u30fb\u9ad8\u901f\u306b\u52d5\u4f5c<\/li>\n\n\n\n<li>\u30fb\u8a2d\u5b9a\u304c\u7c21\u5358<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong><strong>SQLite\u306e\u30c7\u30e1\u30ea\u30c3\u30c8<\/strong><\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u30fb\u30d1\u30b9\u30ef\u30fc\u30c9\u8a2d\u5b9a\u304c\u306a\u3044<\/li>\n\n\n\n<li>\u30fb\u8907\u6570\u306e\u66f8\u304d\u8fbc\u307f\u304c\u3067\u304d\u306a\u3044<\/li>\n\n\n\n<li>\u30fb\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u3088\u308b\u4e92\u63db\u6027\u304c\u306a\u3044<\/li>\n\n\n\n<li>\u30fb\u7ba1\u7406\u30c4\u30fc\u30eb\u304c\u5fae\u5999<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u6a29\u9650\u304croot\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u30e6\u30fc\u30b6\u30fc\u6a29\u9650\u306b\u5909\u66f4<\/h3>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>sudo chown -R $USER:$USER .<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\" data-file=\"mysite\/settings.py\"><code>DATABASES = {\n    &#39;default&#39;: {\n        &#39;ENGINE&#39;: &#39;django.db.backends.mysql&#39;,\n        &#39;NAME&#39;: &#39;django_docker&#39;,\n        &#39;USER&#39;: &#39;user&#39;,\n        &#39;PASSWORD&#39;: &#39;password&#39;,\n        &#39;HOST&#39;: &#39;db&#39;,\n        &#39;POST&#39;: &#39;3306&#39;\n    }\n}<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u5b9f\u884c<\/strong><\/h2>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>$ docker-compose run web .\/manage.py migrate<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>$ docker-compose up web<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306f\u30c7\u30fc\u30bf\u3092\u84c4\u7a4d\u3057\u3066\u5229\u7528\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u3002\u30c6\u30ad\u30b9\u30c8\u30d5\u30a1\u30a4\u30eb\u3067\u30c7\u30fc\u30bf\u7ba1\u7406\u3067\u304d\u308b\u306e\u306f\u3042\u308b\u7a0b\u5ea6\u30b7\u30f3\u30d7\u30eb\u306a\u30c7\u30fc\u30bf\u3092\u30b7\u30f3\u30d7\u30eb\u306b\u51e6\u7406\u3059\u308b\u5834\u5408\u306e\u307f\u3067\u3059\u3002\u3042\u308b\u7a0b\u5ea6\u8907\u96d1\u306a\u3053\u3068\u3092\u3055\u305b\u3088\u3046\u3068\u601d\u3063\u305f\u3089\u3001\u3084\u306f\u308a\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u5229\u7528<\/p>\n","protected":false},"author":1,"featured_media":1490,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jin_ogp_image_url":"","_jin_last_featured_id":0,"footnotes":""},"categories":[36],"tags":[],"class_list":["post-1488","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php"],"_links":{"self":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/1488","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1488"}],"version-history":[{"count":3,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/1488\/revisions"}],"predecessor-version":[{"id":2327,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/1488\/revisions\/2327"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/media\/1490"}],"wp:attachment":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}