{"id":1636,"date":"2018-04-03T00:38:55","date_gmt":"2018-04-02T16:38:55","guid":{"rendered":"http:\/\/www.yueguangzu.net\/?p=1636"},"modified":"2018-04-03T00:58:30","modified_gmt":"2018-04-02T16:58:30","slug":"centos-7-%e5%ae%89%e8%a3%85mysql","status":"publish","type":"post","link":"http:\/\/www.yueguangzu.net\/?p=1636","title":{"rendered":"Centos 7 \u5b89\u88c5Mysql"},"content":{"rendered":"<p>\u5982\u679c\u5728centos 7 \u4f7f\u7528yum -y install mysql-server<\/p>\n<p>\u5b89\u88c5\u7684\u7684\u662f<\/p>\n<p>mariadb-devel-5.5.56-2.el7.x86_64<br \/>\nmariadb-5.5.56-2.el7.x86_64<br \/>\nmariadb-libs-5.5.56-2.el7.x86_64<\/p>\n<p>\u5f97\u4e0d\u5230\u9700\u8981\u7684mysql\u793e\u533a\u7248.<\/p>\n<p>\u6240\u4ee5\u9700\u8981\u6309\u4ee5\u4e0b\u65b9\u6cd5\u5b89\u88c5:<\/p>\n<p>1.\u4e0b\u8f7d\u5e76\u5b89\u88c5msyql\u7684yum\u6e90,\u5e76\u68c0\u67e5\u662f\u5426\u5b89\u88c5\u6210\u529f<\/p>\n<p>wget http:\/\/dev.mysql.com\/get\/mysql57-community-release-el7-8.noarch.rpm<br \/>\nyum localinstall mysql57-community-release-el7-8.noarch.rpm<\/p>\n<p>yum repolist enabled | grep &#8220;mysql.*-community.*&#8221;<\/p>\n<p>2.\u7f16\u8f91yum\u6e90,\u5982\u679c\u9700\u8981\u5b89\u88c55.6\u7684\u7248\u672c\u9700\u8981\u5728enable=0\u5904\u65391,5.7\u7684\u653901<\/p>\n<p>vim \/etc\/yum.repos.d\/mysql-community.repo<\/p>\n<p>3.\u5b89\u88c5\u793e\u533a\u7248mysql<br \/>\nyum install mysql-community-server<\/p>\n<p>4.\u542f\u52a8\u670d\u52a1<\/p>\n<p>service mysqld start<\/p>\n<p>5.\u914d\u7f6e\u9ed8\u8ba4\u7f16\u7801\u548c\u76d1\u542c<br \/>\n[client]<br \/>\ndefault-character-set=utf8<br \/>\n[mysqld]<br \/>\ncharacter-set-server=utf8<br \/>\ncollation-server=utf8_general_ci<br \/>\nbind-address=0.0.0.0<br \/>\nport=33060<\/p>\n<p>6.\u5f00\u673a\u542f\u52a8<\/p>\n<p>systemctl enable mysqld<br \/>\nsystemctl daemon-reload<\/p>\n<p>7.\u83b7\u53d6\u521d\u59cb\u5bc6\u7801<\/p>\n<p>grep &#8216;temporary password&#8217; \/var\/log\/mysqld.log<\/p>\n<p>\u4fee\u6539root\u9ed8\u8ba4\u5bc6\u7801<br \/>\nshell&gt; mysql -uroot -p<br \/>\nmysql&gt; ALTER USER &#8216;root&#8217;@&#8217;localhost&#8217; IDENTIFIED BY &#8216;MyNewPass4!&#8217;;<\/p>\n<p>\u7136\u540e\u5c31\u662f\u719f\u6089\u7684\u754c\u9762\u4e86.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u679c\u5728centos 7 \u4f7f\u7528yum -y install mysql-server \u5b89\u88c5\u7684\u7684\u662f mariadb-devel-5.5.56-2.el7.x86_64 mariadb-5.5.56-2.el7.x86_64 mariadb-li [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[54],"tags":[],"_links":{"self":[{"href":"http:\/\/www.yueguangzu.net\/index.php?rest_route=\/wp\/v2\/posts\/1636"}],"collection":[{"href":"http:\/\/www.yueguangzu.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.yueguangzu.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.yueguangzu.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.yueguangzu.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1636"}],"version-history":[{"count":4,"href":"http:\/\/www.yueguangzu.net\/index.php?rest_route=\/wp\/v2\/posts\/1636\/revisions"}],"predecessor-version":[{"id":1640,"href":"http:\/\/www.yueguangzu.net\/index.php?rest_route=\/wp\/v2\/posts\/1636\/revisions\/1640"}],"wp:attachment":[{"href":"http:\/\/www.yueguangzu.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1636"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.yueguangzu.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1636"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.yueguangzu.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1636"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}