{"id":2869,"date":"2025-02-24T20:37:36","date_gmt":"2025-02-24T11:37:36","guid":{"rendered":"http:\/\/www.whoocus.com\/blog\/?p=2869"},"modified":"2025-02-24T22:59:14","modified_gmt":"2025-02-24T13:59:14","slug":"amazon-linux-2023%e3%81%b8mysql%e3%81%ae%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%ae%e4%bb%95%e6%96%b9","status":"publish","type":"post","link":"https:\/\/www.blowfish.co.jp\/?p=2869","title":{"rendered":"Amazon Linux 2023\u3078MySQL\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">\u4e45\u3057\u3076\u308a\u306e\u6295\u7a3f\u3067\u3042\u308b\u3002\u4eca\u66f4\u306a\u304c\u3089\u52c9\u5f37\u304c\u3066\u3089AWS\u306b\u30b5\u30fc\u30d0\u69cb\u7bc9\u3002\u7d50\u69cbLinux\u30b3\u30de\u30f3\u30c9\u7b49\u304c\u5909\u308f\u3063\u3066\u3044\u3066\u7fd2\u3073\u76f4\u3057\u3002<\/h4>\n\n\n\n<h4 class=\"wp-block-heading\">1. dnf \u30b3\u30de\u30f3\u30c9\u3067 localinstall \u306b\u3066\u30ed\u30fc\u30ab\u30eb\u3078\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3092\u884c\u3046<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo dnf localinstall https:\/\/dev.mysql.com\/get\/mysql84-community-release-el9-1.noarch.rpm<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">2. dnf \u30b3\u30de\u30f3\u30c9\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo dnf install mysql-community-server mysql-community-client mysql-community-devel<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">3. \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u3089mysqld \u3092\u81ea\u52d5\u8d77\u52d5\u306b\u8a2d\u5b9a\u3059\u308b<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo systemctl enable mysqld<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">4. MySQL\u30b5\u30fc\u30d0\u3092\u8d77\u52d5\u3059\u308b<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo systemctl start mysqld<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">5. \u521d\u671f\u30d1\u30b9\u30ef\u30fc\u30c9\u306f \/var\/log\/mysqld.log \u306b\u51fa\u529b\u3055\u308c\u3066\u3044\u308b\u3068\u306e\u3053\u3068\u306a\u306e\u3067\u4e0b\u8a18\u3092 grep \u3067\u62bd\u51fa\u3059\u308b\u3068\u4e00\u6642\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u53d6\u5f97\u3067\u304d\u308b<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo cat \/var\/log\/mysqld.log | grep 'A temporary password is generated for root@localhost:'<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">6. \u4e0a\u8a18\u3067\u53d6\u5f97\u3057\u305f\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u30b3\u30d4\u30fc\u3057\u3066\u4e0b\u8a18\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306b\u30da\u30fc\u30b9\u30c8\u3059\u308b<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>$ mysql -u root -p\nEnter password: <\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">7. \u30ed\u30b0\u30a4\u30f3\u6210\u529f<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>Welcome to the MySQL monitor.  Commands end with ; or \\g.\nYour MySQL connection id is 12\nServer version: 8.4.4\n\nCopyright (c) 2000, 2025, Oracle and\/or its affiliates.\n\nOracle is a registered trademark of Oracle Corporation and\/or its\naffiliates. Other names may be trademarks of their respective\nowners.\n\nType 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.\n\nmysql> <\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">8. root \u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5909\u66f4\u3057\u3066\u304a\u304f<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql> set password for root@localhost='xxxxxxxx';\nQuery OK, 0 rows affected (0.01 sec)<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e45\u3057\u3076\u308a\u306e\u6295\u7a3f\u3067\u3042\u308b\u3002\u4eca\u66f4\u306a\u304c\u3089\u52c9\u5f37\u304c\u3066\u3089AWS\u306b\u30b5\u30fc\u30d0\u69cb\u7bc9\u3002\u7d50\u69cbLinux\u30b3\u30de\u30f3\u30c9\u7b49\u304c\u5909\u308f\u3063\u3066\u3044\u3066\u7fd2\u3073\u76f4\u3057\u3002 1. dnf \u30b3\u30de\u30f3\u30c9\u3067 localinstall \u306b\u3066\u30ed\u30fc\u30ab\u30eb\u3078\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3092\u884c\u3046 2. dnf \u30b3\u30de\u30f3\u30c9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"saved_in_kubio":false,"footnotes":""},"categories":[73,74,11,4],"tags":[],"class_list":["post-2869","post","type-post","status-publish","format-standard","hentry","category-aws","category-linux","category-mysql","category-tech"],"_links":{"self":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2869","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2869"}],"version-history":[{"count":5,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2869\/revisions"}],"predecessor-version":[{"id":2882,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2869\/revisions\/2882"}],"wp:attachment":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2869"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2869"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2869"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}