{"id":17,"date":"2021-01-04T12:23:03","date_gmt":"2021-01-04T04:23:03","guid":{"rendered":"https:\/\/explause.com\/?p=17"},"modified":"2022-03-11T15:57:22","modified_gmt":"2022-03-11T07:57:22","slug":"centos8%e5%ae%89%e8%a3%85mysql80","status":"publish","type":"post","link":"https:\/\/devdoge.org\/?p=17","title":{"rendered":"CentOS8\u5b89\u88c5MySQL80"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u5b89\u88c5\u6700\u65b0\u7248MySQL\uff0c\u6ca1\u4ec0\u4e48\u4e0d\u597d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5148\u4e0b\u8f7dMySQL\u5b98\u65b9\u6e90\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install wget -y\nwget https:\/\/dev.mysql.com\/get\/mysql80-community-release-el8-3.noarch.rpm\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u88c5\u4e0b\u8f7d\u7684\u6e90\u5e76\u5b89\u88c5MySQL\u670d\u52a1\u5668\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install mysql80-community-release-el8-3.noarch.rpm -y\nyum install mysql-server -y<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u542f\u52a8MySQL\u670d\u52a1\u5668\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl start mysqld<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u8981\u8ba9MySQL\u670d\u52a1\u5668\u5f00\u673a\u81ea\u542f\u52a8\u7684\u8bdd\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl enable mysqld<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u767b\u9646MySQL\u670d\u52a1\u5668\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -uroot -p<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u63d0\u793a\u8f93\u5165\u5bc6\u7801\u76f4\u63a5\u6309\u56de\u8f66\u952e\u5c31\u884c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u767b\u9646\u540e\u7684\u7b2c\u4e00\u4ef6\u4e8b\u5c31\u662f\u6539root\u5bc6\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER USER 'root'@'localhost' IDENTIFIED BY '\u8fd9\u91cc\u662f\u65b0\u5bc6\u7801';<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5237\u65b0\u4e00\u4e0b\u6743\u9650\u6570\u636e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>flush privileges;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u9000\u51faMySQL\u670d\u52a1\u5668\uff0c\u8f93\u5165\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>exit<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5e76\u6309\u4e0b\u56de\u8f66\u952e\u5373\u53ef\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u60f3\u6539\u53d8MySQL\u670d\u52a1\u5668\u7ed1\u5b9a\u7684\u7aef\u53e3\u548cIP\u5730\u5740\uff0c\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/etc\/my.cnf.d\/mysql-server.cnf<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728[mysql]\u4e0b\u9762\u7684\u533a\u57df\u8f93\u5165\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>bind-address=127.0.0.1\nport=3306\nmysqlx=OFF<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-verse\">bind-address\u4e3a\u7ed1\u5b9a\u7684IP\u5730\u5740\uff0c\nport\u4e3a\u7ed1\u5b9a\u7684\u7aef\u53e3\uff0c\nmysqlx\u4e3aMySQL X\u534f\u8bae\uff0c\u537333060\u7aef\u53e3\uff08\u6ca1\u7528\u8fc7\uff09\u3002<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7cfb\u7edf\u9ed8\u8ba4\u5b89\u88c5\u7684MySQL\u7248\u672c\u6709\u70b9\u4f4e\uff0c\u90a3\u5c31\u76f4\u63a5\u5e72\u5230\u6700\u65b0\u7248\uff0c\u4ece\u5b98\u65b9\u4e0b\u8f7d\u4e8c\u8fdb\u5236\u6587\u4ef6\u5b89\u88c5\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[10,15],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-c8","tag-centos8","tag-mysql"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"_links":{"self":[{"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/devdoge.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=17"}],"version-history":[{"count":1,"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/posts\/17\/revisions"}],"predecessor-version":[{"id":661,"href":"https:\/\/devdoge.org\/index.php?rest_route=\/wp\/v2\/posts\/17\/revisions\/661"}],"wp:attachment":[{"href":"https:\/\/devdoge.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devdoge.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devdoge.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}