{"id":57,"date":"2020-11-20T22:11:36","date_gmt":"2020-11-20T14:11:36","guid":{"rendered":"https:\/\/refusea.com\/?p=57"},"modified":"2024-02-29T14:27:19","modified_gmt":"2024-02-29T06:27:19","slug":"centos8-2-%e5%ae%89%e8%a3%85-mysql8-0-15","status":"publish","type":"post","link":"https:\/\/refusea.com\/?p=57","title":{"rendered":"centos 8.2 \u5b89\u88c5 mysql 8.0.15"},"content":{"rendered":"<h2>\u73af\u5883<\/h2>\n<ul>\n<li>\u963f\u91cc\u4e91 ECS \u670d\u52a1\u5668\uff1a2 \u6838 4 GB<\/li>\n<li>100G \u4e91\u76d8<\/li>\n<li>5M \u5e26\u5bbd<\/li>\n<li>\u670d\u52a1\u5668\u64cd\u4f5c\u7cfb\u7edf CentOS 8.2<\/li>\n<\/ul>\n<h2>\u4e0b\u8f7d mysql<\/h2>\n<pre><code class=\"language-bash\">wget https:\/\/downloads.mysql.com\/archives\/get\/p\/23\/file\/mysql-community-server-8.0.15-1.el7.x86_64.rpm\nwget https:\/\/downloads.mysql.com\/archives\/get\/p\/23\/file\/mysql-community-client-8.0.15-1.el7.x86_64.rpm\nwget https:\/\/downloads.mysql.com\/archives\/get\/p\/23\/file\/mysql-community-common-8.0.15-1.el7.x86_64.rpm\nwget https:\/\/downloads.mysql.com\/archives\/get\/p\/23\/file\/mysql-community-libs-8.0.15-1.el7.x86_64.rpm<\/code><\/pre>\n<p>\u6216\u8005 8.0.35<\/p>\n<pre><code class=\"language-bash\">https:\/\/downloads.mysql.com\/archives\/get\/p\/23\/file\/mysql-community-common-8.0.35-1.el7.x86_64.rpm\nhttps:\/\/downloads.mysql.com\/archives\/get\/p\/23\/file\/mysql-community-client-plugins-8.0.35-1.el7.x86_64.rpm\nhttps:\/\/downloads.mysql.com\/archives\/get\/p\/23\/file\/mysql-community-libs-8.0.35-1.el7.x86_64.rpm\nhttps:\/\/downloads.mysql.com\/archives\/get\/p\/23\/file\/mysql-community-client-8.0.35-1.el7.x86_64.rpm\n\nhttps:\/\/downloads.mysql.com\/archives\/get\/p\/23\/file\/mysql-community-icu-data-files-8.0.35-1.el7.x86_64.rpm\nhttps:\/\/downloads.mysql.com\/archives\/get\/p\/23\/file\/mysql-community-server-8.0.35-1.el7.x86_64.rpm<\/code><\/pre>\n<h2>\u6309\u987a\u5e8f\u5b89\u88c5<\/h2>\n<pre><code class=\"language-bash\">yum -y localinstall mysql-community-common-8.0.15-1.el7.x86_64.rpm\nyum -y localinstall mysql-community-libs-8.0.15-1.el7.x86_64.rpm\nyum -y localinstall mysql-community-client-8.0.15-1.el7.x86_64.rpm\nyum -y localinstall mysql-community-server-8.0.15-1.el7.x86_64.rpm<\/code><\/pre>\n<p>\u5b89\u88c5 mysql-community-libs-8.0.15-1.el7.x86_64.rpm \u65f6\u5982\u679c\u53d1\u751f\u5982\u4e0b\u9519\u8bef<\/p>\n<pre><code class=\"language-bash\">Error: Package: 2:postfix-2.10.1-9.el7.x86_64 (@anaconda)\n           Requires: libmysqlclient.so.18()(64bit)\n           Removing: 1:mariadb-libs-5.5.68-1.el7.x86_64 (@anaconda)\n               libmysqlclient.so.18()(64bit)\n           Obsoleted By: mysql-community-libs-8.0.15-1.el7.x86_64 (\/mysql-community-libs-8.0.15-1.el7.x86_64)\n              ~libmysqlclient.so.21()(64bit)\n You could try using --skip-broken to work around the problem\n You could try running: rpm -Va --nofiles --nodigest<\/code><\/pre>\n<p>\u539f\u56e0\u662f\u7f3a\u5c11 Percona-XtraDB-Cluster-shared-55-5.5.37-25.10.756.el6.x86_64.rpm \u8fd9\u4e2a\u5305<\/p>\n<pre><code class=\"language-shell\">wget http:\/\/www.percona.com\/redir\/downloads\/Percona-XtraDB-Cluster\/5.5.37-25.10\/RPM\/rhel6\/x86_64\/Percona-XtraDB-Cluster-shared-55-5.5.37-25.10.756.el6.x86_64.rpm\n\nrpm -hiv  Percona-XtraDB-Cluster-shared-55-5.5.37-25.10.756.el6.x86_64.rpm<\/code><\/pre>\n<h2>\u542f\u52a8<\/h2>\n<pre><code class=\"language-bash\">systemctl start mysqld\nsystemctl daemon-reload<\/code><\/pre>\n<h2>\u4fee\u6539 root \u5bc6\u7801<\/h2>\n<p>\u67e5\u627e root \u4e34\u65f6\u5bc6\u7801<\/p>\n<pre><code class=\"language-bash\">grep &quot;A temporary password is generated for root@localhost&quot; \/var\/log\/mysqld.log\n2020-11-20T06:21:53.116940Z 5 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: ;RpuaqB&lt;4czq<\/code><\/pre>\n<p>\u4fee\u6539\u5bc6\u7801<\/p>\n<pre><code class=\"language-bash\">mysql -uroot -p ;RpuaqB&lt;4czq\nmysql: [Warning] Using a password on the command line interface can be insecure.\nWelcome to the MySQL monitor.  Commands end with ; or \\g.\nYour MySQL connection id is 12\nServer version: 8.0.15\n\nCopyright (c) 2000, 2019, Oracle and\/or its affiliates. All rights reserved.\n\nOracle is a registered trademark of Oracle Corporation and\/or its\naffiliates. Other names may be trademarks of their respective\nowners.\n\nType &#039;help;&#039; or &#039;\\h&#039; for help. Type &#039;\\c&#039; to clear the current input statement.\n\nmysql&gt; ALTER USER &#039;root&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;mysql-password&#039;;\nQuery OK, 0 rows affected (0.00 sec)\n\nmysql&gt; quit\nBye<\/code><\/pre>\n<h2>\u4e3a\u5b89\u88c5 wordpress \u51c6\u5907\u6570\u636e\u5e93\u548c\u7528\u6237<\/h2>\n<p>\u5728 mysql \u547d\u4ee4\u884c\u6a21\u5f0f\u4e0b\u6267\u884c\u5982\u4e0b\u547d\u4ee4<\/p>\n<pre><code class=\"language-sql\"># \u521b\u5efa\u6570\u636e\u5e93\ncreate database wordpress;\n# \u521b\u5efa\u7528\u6237\nCREATE USER &#039;wpuser&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;password&#039;;\n# \u6388\u6743\nGRANT all privileges ON wordpress.* TO &#039;wpuser&#039;@&#039;localhost&#039;;\n# \u4f7f\u7528\u5bc6\u7801\u767b\u9646\nALTER USER &#039;wpuser&#039;@&#039;localhost&#039; IDENTIFIED WITH mysql_native_password BY &#039;password&#039;;\n# \u5237\u65b0\nFLUSH PRIVILEGES;<\/code><\/pre>\n<h2>my.cnf \u5728\u54ea\u91cc<\/h2>\n<pre><code class=\"language-bash\">mysql --help\n\nDefault options are read from the following files in the given order:\n\/etc\/my.cnf \/etc\/mysql\/my.cnf \/usr\/etc\/my.cnf ~\/.my.cnf <\/code><\/pre>\n<h2>\u5b57\u7b26\u96c6<\/h2>\n<p>\u4ece 8.0 \u5f00\u59cb\uff0c\u5b57\u7b26\u96c6\u9ed8\u8ba4\u4e3a utf8mb4<\/p>\n<pre><code class=\"language-bash\">mysql&gt; show variables like &#039;%charac%&#039;;\n+--------------------------+--------------------------------+\n| Variable_name            | Value                          |\n+--------------------------+--------------------------------+\n| character_set_client     | utf8mb4                        |\n| character_set_connection | utf8mb4                        |\n| character_set_database   | utf8mb4                        |\n| character_set_filesystem | binary                         |\n| character_set_results    | utf8mb4                        |\n| character_set_server     | utf8mb4                        |\n| character_set_system     | utf8                           |\n| character_sets_dir       | \/usr\/share\/mysql-8.0\/charsets\/ |\n+--------------------------+--------------------------------+\n8 rows in set (0.01 sec)<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u73af\u5883 \u963f\u91cc\u4e91 ECS \u670d\u52a1\u5668\uff1a2 \u6838 4 GB 100G \u4e91\u76d8 5M \u5e26\u5bbd \u670d\u52a1\u5668\u64cd\u4f5c\u7cfb\u7edf CentOS 8. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[8],"class_list":["post-57","post","type-post","status-publish","format-standard","hentry","category-linux","tag-mysql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>centos 8.2 \u5b89\u88c5 mysql 8.0.15 - \u62d2\u6d77\u7a7a\u95f4<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/refusea.com\/?p=57\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"refusea.com\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/refusea.com\/?p=57#article\",\"isPartOf\":{\"@id\":\"https:\/\/refusea.com\/?p=57\"},\"author\":{\"name\":\"refusea.com\",\"@id\":\"https:\/\/refusea.com\/#\/schema\/person\/b5393cc8b15717000d19424552aae0df\"},\"headline\":\"centos 8.2 \u5b89\u88c5 mysql 8.0.15\",\"datePublished\":\"2020-11-20T14:11:36+00:00\",\"dateModified\":\"2024-02-29T06:27:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/refusea.com\/?p=57\"},\"wordCount\":27,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/refusea.com\/#\/schema\/person\/b5393cc8b15717000d19424552aae0df\"},\"keywords\":[\"mysql\"],\"articleSection\":[\"Linux\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/refusea.com\/?p=57#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/refusea.com\/?p=57\",\"url\":\"https:\/\/refusea.com\/?p=57\",\"name\":\"centos 8.2 \u5b89\u88c5 mysql 8.0.15 - \u62d2\u6d77\u7a7a\u95f4\",\"isPartOf\":{\"@id\":\"https:\/\/refusea.com\/#website\"},\"datePublished\":\"2020-11-20T14:11:36+00:00\",\"dateModified\":\"2024-02-29T06:27:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/refusea.com\/?p=57#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/refusea.com\/?p=57\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/refusea.com\/?p=57#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/refusea.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"centos 8.2 \u5b89\u88c5 mysql 8.0.15\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/refusea.com\/#website\",\"url\":\"https:\/\/refusea.com\/\",\"name\":\"\u62d2\u6d77\u7a7a\u95f4\",\"description\":\"\u62d2\u6d77\u7684\u4e2a\u4eba\u535a\u5ba2\",\"publisher\":{\"@id\":\"https:\/\/refusea.com\/#\/schema\/person\/b5393cc8b15717000d19424552aae0df\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/refusea.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/refusea.com\/#\/schema\/person\/b5393cc8b15717000d19424552aae0df\",\"name\":\"refusea.com\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/refusea.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7f7489b4afdbd952db64e7a6704d1258?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7f7489b4afdbd952db64e7a6704d1258?s=96&d=mm&r=g\",\"caption\":\"refusea.com\"},\"logo\":{\"@id\":\"https:\/\/refusea.com\/#\/schema\/person\/image\/\"},\"sameAs\":[\"https:\/\/refusea.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"centos 8.2 \u5b89\u88c5 mysql 8.0.15 - \u62d2\u6d77\u7a7a\u95f4","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/refusea.com\/?p=57","twitter_misc":{"\u4f5c\u8005":"refusea.com","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/refusea.com\/?p=57#article","isPartOf":{"@id":"https:\/\/refusea.com\/?p=57"},"author":{"name":"refusea.com","@id":"https:\/\/refusea.com\/#\/schema\/person\/b5393cc8b15717000d19424552aae0df"},"headline":"centos 8.2 \u5b89\u88c5 mysql 8.0.15","datePublished":"2020-11-20T14:11:36+00:00","dateModified":"2024-02-29T06:27:19+00:00","mainEntityOfPage":{"@id":"https:\/\/refusea.com\/?p=57"},"wordCount":27,"commentCount":0,"publisher":{"@id":"https:\/\/refusea.com\/#\/schema\/person\/b5393cc8b15717000d19424552aae0df"},"keywords":["mysql"],"articleSection":["Linux"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/refusea.com\/?p=57#respond"]}]},{"@type":"WebPage","@id":"https:\/\/refusea.com\/?p=57","url":"https:\/\/refusea.com\/?p=57","name":"centos 8.2 \u5b89\u88c5 mysql 8.0.15 - \u62d2\u6d77\u7a7a\u95f4","isPartOf":{"@id":"https:\/\/refusea.com\/#website"},"datePublished":"2020-11-20T14:11:36+00:00","dateModified":"2024-02-29T06:27:19+00:00","breadcrumb":{"@id":"https:\/\/refusea.com\/?p=57#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/refusea.com\/?p=57"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/refusea.com\/?p=57#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/refusea.com\/"},{"@type":"ListItem","position":2,"name":"centos 8.2 \u5b89\u88c5 mysql 8.0.15"}]},{"@type":"WebSite","@id":"https:\/\/refusea.com\/#website","url":"https:\/\/refusea.com\/","name":"\u62d2\u6d77\u7a7a\u95f4","description":"\u62d2\u6d77\u7684\u4e2a\u4eba\u535a\u5ba2","publisher":{"@id":"https:\/\/refusea.com\/#\/schema\/person\/b5393cc8b15717000d19424552aae0df"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/refusea.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/refusea.com\/#\/schema\/person\/b5393cc8b15717000d19424552aae0df","name":"refusea.com","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/refusea.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7f7489b4afdbd952db64e7a6704d1258?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7f7489b4afdbd952db64e7a6704d1258?s=96&d=mm&r=g","caption":"refusea.com"},"logo":{"@id":"https:\/\/refusea.com\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/refusea.com"]}]}},"_links":{"self":[{"href":"https:\/\/refusea.com\/index.php?rest_route=\/wp\/v2\/posts\/57"}],"collection":[{"href":"https:\/\/refusea.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/refusea.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/refusea.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/refusea.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=57"}],"version-history":[{"count":8,"href":"https:\/\/refusea.com\/index.php?rest_route=\/wp\/v2\/posts\/57\/revisions"}],"predecessor-version":[{"id":1675,"href":"https:\/\/refusea.com\/index.php?rest_route=\/wp\/v2\/posts\/57\/revisions\/1675"}],"wp:attachment":[{"href":"https:\/\/refusea.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=57"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/refusea.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=57"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/refusea.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=57"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}