{"id":406,"date":"2017-01-26T19:23:47","date_gmt":"2017-01-26T10:23:47","guid":{"rendered":"https:\/\/knowhow.hirohiro716.com\/?p=406"},"modified":"2017-02-21T14:51:22","modified_gmt":"2017-02-21T05:51:22","slug":"centos7%e3%81%b8mysql5-7%e3%82%92%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/weblog.hirohiro716.com\/?p=406","title":{"rendered":"CentOS7\u3078MySQL5.7\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b"},"content":{"rendered":"<p>CentOS7\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067MariaDB\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3068\u601d\u308f\u308c\u308b\u306e\u3067\u3001\u524a\u9664\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# yum remove mariadb-libs\r\n# rm -d -r -f \/var\/lib\/mysql\/\r\n<\/pre>\n<p>MySQL\u30b5\u30fc\u30d0\u30fc\u3092\u30ed\u30fc\u30ab\u30eb\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<br \/>\n\u203bhttps:\/\/dev.mysql.com\/downloads\/repo\/yum\/\u3092\u53c2\u8003\u306b\u9069\u5b9cURL\u3092\u5909\u66f4<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# yum localinstall http:\/\/dev.mysql.com\/get\/mysql57-community-release-el7-9.noarch.rpm\r\n<\/pre>\n<p>MySQL\u30b5\u30fc\u30d0\u30fc\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# yum -y install mysql-community-server\r\n<\/pre>\n<p>\u6587\u5b57\u30b3\u30fc\u30c9\u3092UTF-8\u306b\u8a2d\u5b9a\u3059\u308b\u3002<br \/>\n\/etc\/my.cnf\u3092\u7de8\u96c6\u3057\u3066\u4e0b\u8a18\uff11\u884c\u3092\u8ffd\u52a0\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ncharacter-set-server = utf8\r\n<\/pre>\n<p>MySQL\u30b5\u30fc\u30d0\u30fc\u304c\u81ea\u52d5\u8d77\u52d5\u3059\u308b\u3088\u3046\u69cb\u6210\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# systemctl enable mysqld.service\r\n<\/pre>\n<p>MySQL\u30b5\u30fc\u30d0\u30fc\u3092\u8d77\u52d5\u3002<br \/>\n\u203b\u3053\u306e\u6642\u70b9\u3067root\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u304c\u81ea\u52d5\u751f\u6210\u3055\u308c\u30ed\u30b0\u306b\u66f8\u304d\u8fbc\u307e\u308c\u308b(\/var\/log\/mysqld.log)<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# systemctl start mysqld.service\r\n<\/pre>\n<p>MySQL\u30b5\u30fc\u30d0\u30fc\u306e\u521d\u671f\u8a2d\u5b9a\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# mysql_secure_installation\r\n<\/pre>\n<p>\u30d1\u30b9\u30ef\u30fc\u30c9\u30dd\u30ea\u30b7\u30fc\u3092MEDIUM\u304b\u3089LOW\u306b\u5909\u66f4\u3059\u308b\u3002<br \/>\nmysql -p \u3067\u30ed\u30b0\u30a4\u30f3\u5f8c\u306b<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nSET GLOBAL validate_password_policy=LOW\r\n<\/pre>\n<p>php-mysql\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n# yum -y install php-mysql\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>CentOS7\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067MariaDB\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3068\u601d\u308f\u308c\u308b\u306e\u3067\u3001\u524a\u9664\u3002 # yum remove mariadb-libs # rm -d -r -f \/var\/lib\/mysql\/ MySQL\u30b5\u30fc\u30d0\u30fc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-406","post","type-post","status-publish","format-standard","hentry","category-centos"],"views":964,"_links":{"self":[{"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/posts\/406","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=406"}],"version-history":[{"count":4,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/posts\/406\/revisions"}],"predecessor-version":[{"id":495,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=\/wp\/v2\/posts\/406\/revisions\/495"}],"wp:attachment":[{"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=406"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/weblog.hirohiro716.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}