{"id":4443,"date":"2025-08-01T11:01:30","date_gmt":"2025-08-01T02:01:30","guid":{"rendered":"https:\/\/www.kinryo.net\/?p=4443"},"modified":"2025-08-20T16:40:04","modified_gmt":"2025-08-20T07:40:04","slug":"%ef%bc%99%ef%bc%9a%e3%83%87%e3%83%bc%e3%82%bf%e3%83%bc%e3%83%99%e3%83%bc%e3%82%b9%e3%81%ae%e8%a8%ad%e5%ae%9a","status":"publish","type":"post","link":"https:\/\/www.kinryo.net\/?p=4443","title":{"rendered":"\uff19\uff1a\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u306e\u8a2d\u5b9a"},"content":{"rendered":"\r\n<p class=\"wp-block-paragraph\">Database\u3092mariadb(3:10.5.27-1)\u306b\u5909\u66f4\u3057\u305f\u306e\u3067\u3001\u8a2d\u5b9a\u304c\u5fc5\u8981\u306b\u306a\u308b\u3002database\u306a\u3069\u3092\u4f5c\u3063\u3066\u3044\u304f<br \/><span style=\"color: #008000;\"><span style=\"color: #ff6600;\">[fuji@rails8 TourData]$\u00a0<\/span> sudo mysql<\/span><br \/><span style=\"color: #ff6600;\">\u524d\u7565<\/span><br \/><span style=\"color: #ff6600;\">MariaDB [(none)]&gt;<\/span> <span style=\"color: #008000;\">grant all privileges on tour_data_development.* to yyyyyyy@localhost identified by &#8220;xxxxxxxx&#8221;;<\/span><br \/><span style=\"color: #ff6600;\">Query OK, 0 rows affected (0.001 sec)<\/span><\/p>\r\n<p><span style=\"color: #ff6600;\">\r\n\r\n<\/span><\/p>\r\n<p class=\"wp-block-paragraph\"><span style=\"color: #ff6600;\">MariaDB [(none)]&gt;<\/span><span style=\"color: #008000;\"> grant all privileges on tour_data_test.* to <span>yyyyyyy<\/span>@localhost identified by &#8220;xxxxxxxxx&#8221;;<\/span><br \/><span style=\"color: #ff6600;\">Query OK, 0 rows affected (0.002 sec)<\/span><\/p>\r\n<p><span style=\"color: #ff6600;\">MariaDB [(none)]&gt;<\/span> <span style=\"color: #008000;\">flush privileges;<\/span><br \/><span style=\"color: #ff6600;\">Query OK, 0 rows affected (0.000 sec)<\/span><\/p>\r\n<p><span style=\"color: #ff6600;\">\r\n\r\n<\/span><\/p>\r\n<p class=\"wp-block-paragraph\"><span style=\"color: #ff6600;\">\r\n\r\n<\/span><\/p>\r\n<p class=\"wp-block-paragraph\"><span style=\"color: #ff6600;\">MariaDB [(none)]&gt;<\/span> <span style=\"color: #008000;\">create database tour_data_development;<\/span><br \/><span style=\"color: #ff6600;\">Query OK, 1 row affected (0.000 sec)<\/span><\/p>\r\n<p><span style=\"color: #ff6600;\">\r\n\r\n<\/span><\/p>\r\n<p class=\"wp-block-paragraph\"><span style=\"color: #ff6600;\">MariaDB [(none)]&gt;<\/span> <span style=\"color: #008000;\">create database tour_data_test;<\/span><br \/><span style=\"color: #ff6600;\">Query OK, 1 row affected (0.000 sec)<\/span><\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">\u3053\u3053\u3067\u3001\u3053\u308c\u304b\u3089\u4f5c\u308brails\u30a2\u30d7\u30ea\u3092\u4f5c\u308b,\u30c7\u30fc\u30bf\u30fc\u30d9\u30fc\u30b9\u306fmysql\u306b\u3059\u308b\u304c\u3001\u30a2\u30d7\u30ea\u3092\u7f6e\u304f\u9818\u57df\u3092\u4f5c\u3063\u3066\u3042\u308b\u306e\u3067\u305d\u3053\u306b\u79fb\u52d5(30Gib\u3042\u308b\uff09<br \/><span style=\"color: #ff6600;\">[fuji@rails8 ~]$<\/span> <span style=\"color: #008000;\">cd \/rails<\/span><br \/><span><span style=\"color: #ff6600;\">[fuji@rails8 Rails]$<\/span> <span style=\"color: #008000;\">rails new TourData -d mysql<\/span><br \/><\/span>\u00a0\u00a0\u00a0\u00a0 <span style=\"color: #ff6600;\">create <\/span><br \/><span style=\"color: #ff6600;\">\u00a0\u00a0\u00a0\u00a0 create README.md<\/span><br \/><span style=\"color: #ff6600;\">\u00a0\u00a0\u00a0\u00a0 create Rakefile<\/span><br \/><span style=\"color: #ff6600;\">\u00a0\u00a0\u00a0\u00a0 create .ruby-version<\/span><br \/><span style=\"color: #ff6600;\">\u00a0\u00a0\u00a0\u00a0 create config.ru<\/span><br \/><span style=\"color: #ff6600;\">\u00a0\u00a0\u00a0\u00a0 create .gitignore<\/span><br \/><span style=\"color: #ff6600;\">\u00a0\u00a0\u00a0\u00a0 create .gitattributes<\/span><br \/>\u5f8c\u7565<br \/><span style=\"color: #ff6600;\">[fuji@rails8 ~]$ <\/span><span style=\"color: #008000;\">cd TourData<\/span><br \/>\u6b21\u306b\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u306e\u5909\u66f4<br \/><span style=\"color: #008000;\"><span style=\"color: #ff6600;\">[fuji@rails8 TourData]$\u00a0 <\/span>gedit config\/database.yml<\/span><\/p>\r\n<p><span style=\"color: #0000ff;\">default: &amp;default<\/span><br \/><span style=\"color: #0000ff;\">adapter: mysql2<\/span><br \/><span style=\"color: #0000ff;\">encoding: utf8mb4<\/span><br \/><span style=\"color: #0000ff;\">pool: &lt;%= ENV.fetch(&#8220;RAILS_MAX_THREADS&#8221;) { 5 } %&gt;<\/span><br \/><span style=\"color: #0000ff;\">username: yyyyyyy\u00a0 <span style=\"color: #333333;\">\u2190 \u3053\u3053\u3092\u8a2d\u5b9a\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u306b<\/span><\/span><br \/><span style=\"color: #0000ff;\">password: xxxxxxx\u00a0\u00a0 <span style=\"color: #333333;\">\u3053\u3053\u3092\u8a2d\u5b9a\u3057\u305f\u30d1\u30b9\u30ef\u30fc\u30c9\u306b<\/span><\/span><br \/><span style=\"color: #0000ff;\">socket: \/var\/lib\/mysql\/mysql.sock<\/span><\/p>\r\n<p><span style=\"color: #0000ff;\">development:<\/span><br \/><span style=\"color: #0000ff;\">&lt;&lt;: *default<\/span><br \/><span style=\"color: #0000ff;\">database: tour_data_development<\/span><\/p>\r\n<p>Gem\u30d5\u30a1\u30a4\u30eb\u8a18\u8f09\u3055\u308c\u305f\u30d1\u30c3\u30b1\u30fc\u30b8\u7fa4\u306e\u76f8\u4e92\u4f9d\u5b58\u95a2\u4fc2\u3092\u8abf\u3079\u308b\u305f\u3081<br \/><span style=\"color: #ff6600;\">[fuji@rails8 TourData]$<\/span> <span style=\"color: #008000;\">bundle<\/span><br \/><span style=\"color: #ff6600;\">Bundle complete! 21 Gemfile dependencies, 119 gems now installed.<\/span><br \/><span style=\"color: #ff6600;\">Use `bundle info [gemname]` to see where a bundled gem is installed.<\/span><br \/><span style=\"color: #ff6600;\">1 installed gem you directly depend on is looking for funding.<\/span><br \/><span style=\"color: #ff6600;\">Run `bundle fund` for details<\/span><\/p>\r\n<p>\u3067\u65b0\u898f\u306b\u7aef\u672b\u3092\u958b\u3044\u3066WEB\u30b5\u30fc\u30d0\u30fc\u3092\u7acb\u3061\u4e0a\u3052\u308b\u304c\u3001\u3053\u306e\u7aef\u672b\u306f\u305a\u30fc\u3063\u3068\u3001\u30b5\u30fc\u30d0\u30fc\u304c\u4f7f\u7528\u3059\u308b\u306e\u3067\u3001\u4eca\u5f8c\u306e\u305f\u3081\u306b\u5225\u306e\u7aef\u672b\u3092\u7acb\u3061\u4e0a\u3052\u305d\u3053\u3067\u30b5\u884c\u3092\u3059\u308b<br \/><span style=\"color: #ff6600;\">[fuji@rails8 TourData]$\u00a0 <\/span>\u00a0<span style=\"color: #008000;\">rails s<\/span><br \/><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.kinryo.net\/wp-content\/uploads\/2025\/08\/Screenshot-from-2025-08-01-11-32-15.png\" alt=\"\" width=\"864\" height=\"592\" class=\"alignnone size-full wp-image-4448\" srcset=\"https:\/\/www.kinryo.net\/wp-content\/uploads\/2025\/08\/Screenshot-from-2025-08-01-11-32-15.png 864w, https:\/\/www.kinryo.net\/wp-content\/uploads\/2025\/08\/Screenshot-from-2025-08-01-11-32-15-300x206.png 300w, https:\/\/www.kinryo.net\/wp-content\/uploads\/2025\/08\/Screenshot-from-2025-08-01-11-32-15-150x103.png 150w\" sizes=\"auto, (max-width: 864px) 100vw, 864px\" \/><br \/>\u30d6\u30e9\u30a6\u30b6\u3067localhost:3000\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3066\u3001\u4e0a\u306b\u753b\u9762\u304c\u51fa\u308c\u3070\u6b63\u5e38\u3067\u3059\u3002<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>Database\u3092mariadb(3:10.5.27-1)\u306b\u5909\u66f4\u3057\u305f\u306e\u3067\u3001\u8a2d\u5b9a\u304c\u5fc5\u8981\u306b\u306a\u308b\u3002database\u306a\u3069\u3092\u4f5c\u3063\u3066\u3044\u304f[fuji@rails8 TourData]$\u00a0 sudo mysql\u524d\u7565MariaDB [(n &hellip; <a href=\"https:\/\/www.kinryo.net\/?p=4443\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"common","vkexunit_cta_each_option":"","footnotes":""},"categories":[28],"tags":[],"class_list":["post-4443","post","type-post","status-publish","format-standard","hentry","category-ruby-on-rails-almalinux9"],"acf":[],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/4443","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4443"}],"version-history":[{"count":6,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/4443\/revisions"}],"predecessor-version":[{"id":4476,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/4443\/revisions\/4476"}],"wp:attachment":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4443"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4443"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4443"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}