{"id":52,"date":"2014-12-17T21:00:25","date_gmt":"2014-12-17T12:00:25","guid":{"rendered":"http:\/\/vicsfactory.com\/?p=52"},"modified":"2014-12-18T11:15:32","modified_gmt":"2014-12-18T02:15:32","slug":"centos7-%e3%80%8cmysql%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e3%83%bb%e8%a8%ad%e5%ae%9a%e3%80%8d","status":"publish","type":"post","link":"https:\/\/vicsfactory.com\/?p=52","title":{"rendered":"CentOS7 \u300cMySQL\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u8a2d\u5b9a\u300d"},"content":{"rendered":"<p>MySQL\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u8a2d\u5b9a<\/p>\n<p>\u203bCentOS7\u95a2\u9023\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u306f\u300c<a href=\"http:\/\/centossrv.com\" target=\"_blank\">CentOS\u3067\u81ea\u5b85\u30b5\u30fc\u30d0\u30fc\u69d8<\/a>\u300d\u3092\u53c2\u8003\u306b\u81ea\u5206\u306e\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u25cfCentOS7\u306b\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u5165\u3063\u3066\u3044\u308bMariaDB\u3092\u30a2\u30f3\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n# yum -y remove mariadb<br \/>\n# yum -y remove mariadb-libs<\/p>\n<p>\u25cfMySQL\u516c\u5f0f\u30ea\u30dd\u30b8\u30c8\u30ea\u30d5\u30a1\u30a4\u30eb\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n# yum -y install http:\/\/dev.mysql.com\/get\/mysql-community-release-el7-5.noarch.rpm<\/p>\n<p>\u25cfMySQL\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n# yum -y install mysql<br \/>\n# yum -y install mysql-devel<br \/>\n# yum -y install mysql-server<br \/>\n# yum -y install mysql-utilities<\/p>\n<p>\u25cfmysql\u8d77\u52d5\u3001systemctl\u306b\u767b\u9332<br \/>\n# service mysqld start<\/p>\n<p>\u25cfmysqld\u81ea\u52d5\u8d77\u52d5\u8a2d\u5b9a<br \/>\n# systemctl enable mysqld<\/p>\n<p>\u25cfDB\u521d\u671f\u8a2d\u5b9a<br \/>\n# \/usr\/bin\/mysql_secure_installation<br \/>\n1. Enter current password for root (enter for none):\u3000\u2190\u3000[Enter]<br \/>\n2. Set root password? [Y\/n]\u3000\u2190\u3000\u300cEnter] root\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u8a2d\u5b9a<br \/>\nNew Password:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u2190\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b<br \/>\nRe-enter new password:\u00a0\u00a0\u00a0 \u2190\u3000\u30d1\u30b9\u30ef\u30fc\u30c9\u518d\u5165\u529b<br \/>\n3. Remove anonymous users? [Y\/n]\u00a0 \u2190\u3000\u300cEnter]\u3000\u533f\u540d\u30e6\u30fc\u30b6\u524a\u9664<br \/>\n4. Disallow root login remotely? [Y\/n]\u00a0 \u2190\u3000[Enter]\u00a0 \u30ea\u30e2\u30fc\u30c8\u304b\u3089\u306eroot\u30ed\u30b0\u30a4\u30f3\u7981\u6b62<br \/>\n5. Remove test database and access to it? [Y\/n]\u3000\u2190\u3000[Enter]\u3000\u30c6\u30b9\u30c8\u7528\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u524a\u9664<br \/>\n6. Reload privilege tables now? [Y\/n]\u00a0 \u2190\u3000[Enter]\u00a0 \u8a2d\u5b9a\u53cd\u6620<\/p>\n<p>\u25cfMySQL\u306e\u6587\u5b57\u30b3\u30fc\u30c9\u3092UTF-8\u306b\u5909\u66f4<br \/>\n# vi \/etc\/my.cnf<br \/>\n[mysqld]\u306e\u6700\u4e0b\u884c\u306b\u4ee5\u4e0b\u3092\u8ffd\u52a0<br \/>\ncharacter_set_server=utf8<br \/>\nskip-character-set-client-handshake<\/p>\n<p>MySQL\u518d\u8d77\u52d5<br \/>\n# systemctl restart mysqld<\/p>\n<p>\u203bmysqldump\u7b49\u3067MySQL5.1\u4ee5\u524d\u306e\u53e4\u3044MySQL\u304b\u3089\u30c7\u30fc\u30bf\u3092\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3059\u308b\u969b\u3001\u4ee5\u4e0b\u306e\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u63a5\u7d9a\u51fa\u6765\u306a\u3044\u3068\u304d<br \/>\nWarning: Using a password on the command line interface can be insecure.<br \/>\nmysqldump: Got error: 2049: Connection using old (pre-4.1.1) authentication<br \/>\nprotocol refused (client option &#8216;secure_auth&#8217; enabled) when trying to connect<\/p>\n<p>mysqldump\u30b3\u30de\u30f3\u30c9\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u306e\u5f8c\u306b\u300c&#8211;skip-secure-auth\u300d\u3092\u8ffd\u52a0<\/p>\n<p>&nbsp;<\/p>\n<p>\u203b\u5916\u90e8\u304b\u3089MySQL\u306b\u63a5\u7d9a\u3059\u308b\u5834\u5408\u306f\u30eb\u30fc\u30bf\u30fc\u3067TCP3306\u756a\u3092\u30b5\u30fc\u30d0\u30fc\u306b\u901a\u3059\u3088\u3046\u306b\u8a2d\u5b9a\u3059\u308b<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u8a2d\u5b9a \u203bCentOS7\u95a2\u9023\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30fb\u8a2d\u5b9a\u306b\u3064\u3044\u3066\u306f\u300cCentOS\u3067\u81ea\u5b85\u30b5\u30fc\u30d0\u30fc\u69d8\u300d\u3092\u53c2\u8003\u306b\u81ea\u5206\u306e\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002 \u25cfCentOS7\u306b\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u5165\u3063\u3066\u3044\u308bMariaDB\u3092\u30a2\u30f3\u30a4 &hellip; <a href=\"https:\/\/vicsfactory.com\/?p=52\">\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":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/posts\/52"}],"collection":[{"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=52"}],"version-history":[{"count":4,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/posts\/52\/revisions"}],"predecessor-version":[{"id":80,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=\/wp\/v2\/posts\/52\/revisions\/80"}],"wp:attachment":[{"href":"https:\/\/vicsfactory.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vicsfactory.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}