{"id":249,"date":"2023-02-04T11:26:48","date_gmt":"2023-02-04T03:26:48","guid":{"rendered":"http:\/\/39.104.58.144\/?p=249"},"modified":"2023-02-07T19:38:54","modified_gmt":"2023-02-07T11:38:54","slug":"mysql-8-0-32","status":"publish","type":"post","link":"http:\/\/www.algmain.com\/index.php\/2023\/02\/04\/mysql-8-0-32\/","title":{"rendered":"\u5347\u7ea7\u81f3MySql-8.0.32"},"content":{"rendered":"\n<p>MySql\u6570\u636e\u4e0eMariaDb\u6709\u51b2\u7a81\uff0c\u5347\u7ea7\u4e4b\u524d\u9700\u5148\u5378\u8f7dMariaDb\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#rpm -qa | grep mariadb\n......\n#rpm -e mariadb-libs-*.*.**-*.el7.x86_64 --nodeps\n......\n#rpm -qa | grep mariadb\n......\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">1 \u4e0b\u8f7dMySql<\/h2>\n\n\n\n<p>\u4f7f\u7528\u6d4f\u89c8\u5668\u8bbf\u95ee<a href=\"https:\/\/dev.mysql.com\/downloads\/mysql\/\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL\u4e0b\u8f7d\u9875\u9762<\/a>\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"954\" height=\"1024\" src=\"http:\/\/39.104.58.144\/wp-content\/uploads\/2023\/02\/mysqldownload-954x1024.png\" alt=\"\" class=\"wp-image-250\" srcset=\"http:\/\/www.algmain.com\/wp-content\/uploads\/2023\/02\/mysqldownload-954x1024.png 954w, http:\/\/www.algmain.com\/wp-content\/uploads\/2023\/02\/mysqldownload-279x300.png 279w, http:\/\/www.algmain.com\/wp-content\/uploads\/2023\/02\/mysqldownload-768x824.png 768w, http:\/\/www.algmain.com\/wp-content\/uploads\/2023\/02\/mysqldownload-1431x1536.png 1431w, http:\/\/www.algmain.com\/wp-content\/uploads\/2023\/02\/mysqldownload.png 1457w\" sizes=\"(max-width: 954px) 100vw, 954px\" \/><figcaption class=\"wp-element-caption\">MySQL\u4e0b\u8f7d\u9875\u9762<\/figcaption><\/figure>\n\n\n\n<p><em>\u6ce8\u610f\uff1aOperating System \u9700\u8981\u9009\u62e9Linux\uff0cOS Version\u9700\u8981\u9009\u62e9Linux 7\u3002\u8fd9\u6837\u624d\u53ef\u4ee5\u4e0eCentOS 7\u76f8\u4e92\u5bf9\u5e94\u3002\u5982\u679c\u9009\u62e9\u4e0d\u6b63\u786e\u7684\u5b89\u88c5\u5305\uff0c\u5219\u4f1a\u5bfc\u81f4\u5404\u79cd\u5947\u602a\u7684\u95ee\u9898\u3002<\/em><\/p>\n\n\n\n<p>\u9009\u62e9\u4e0b\u8f7dRPM Bundle\uff1a<a href=\"https:\/\/dev.mysql.com\/get\/Downloads\/MySQL-8.0\/mysql-8.0.32-1.el7.x86_64.rpm-bundle.tar\">mysql-8.0.32-1.el7.x86_64.rpm-bundle.tar<\/a>\u3002\u5176\u4e2del7\u8868\u660e\u8be5\u6570\u636e\u5305\u5bf9\u5e94Linux 7.x\u7cfb\u7edf\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2 \u5b89\u88c5MySQL<\/h2>\n\n\n\n<p>\u5c06\u4e0b\u8f7d\u7684\u6570\u636e\u5305\uff0c\u4e0a\u4f20\u81f3\u670d\u52a1\u5668\u7684\/usr\/local\/src\u76ee\u5f55\u4e0b\u3002<\/p>\n\n\n\n<p>\u89e3\u538b\u7f29\u6570\u636e\u5305\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#cd \/usr\/local\/src\n......\n#tar xf mysql-8.0.32-1.el7.x86_64.rpm\n......\n#ls\nmysql-community-client-8.0.32-1.el7.x86_64.rpm\nmysql-community-client-plugins-8.0.32-1.el7.x86_64.rpm\nmysql-community-common-8.0.32-1.el7.x86_64.rpm\nmysql-community-debuginfo-8.0.32-1.el7.x86_64.rpm\nmysql-community-devel-8.0.32-1.el7.x86_64.rpm\nmysql-community-embedded-compat-8.0.32-1.el7.x86_64.rpm\nmysql-community-icu-data-files-8.0.32-1.el7.x86_64.rpm\nmysql-community-libs-8.0.32-1.el7.x86_64.rpm\nmysql-community-libs-compat-8.0.32-1.el7.x86_64.rpm\nmysql-community-libs-server-8.0.32-1.el7.x86_64.rpm\nmysql-community-libs-server-debug-8.0.32-1.el7.x86_64.rpm\nmysql-community-test-8.0.32-1.el7.x86_64.rpm\n......\n<\/pre><\/div>\n\n\n<p>\u6309\u7167\u5982\u4e0b\u987a\u5e8f\u6267\u884c\u5b89\u88c5\u8fc7\u7a0b\u3002<\/p>\n\n\n\n<p>\u5b89\u88c5common\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#rpm -ivh mysql-community-common-8.0.32-1.el7.x86_64.rpm --nodeps --force\n......\n<\/pre><\/div>\n\n\n<p>\u5b89\u88c5libs\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#rpm -ivh mysql-libs-8.0.32-1.el7.x86_64.rpm --nodeps --force\n......\n<\/pre><\/div>\n\n\n<p>\u5b89\u88c5libs-compat\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#rpm -ivh mysql-libs-compat-8.0.32-1.el7.x86_64.rpm --nodeps --force\n......\n<\/pre><\/div>\n\n\n<p>\u5b89\u88c5client\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#rpm -ivh mysql-client-8.0.32-1.el7.x86_64.rpm --nodeps --force ......\n<\/pre><\/div>\n\n\n<p>\u5b89\u88c5server\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#rpm -ivh mysql-server-8.0.32-1.el7.x86_64.rpm --nodeps --force ......\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">3 \u914d\u7f6eMySql<\/h2>\n\n\n\n<p>\u521d\u59cb\u5316mysql\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#mysqld --initialize\n......\n<\/pre><\/div>\n\n\n<p>\u914d\u7f6e\u670d\u52a1\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#chown mysql.mysql \/var\/lib\/mysql -R\n......\n#systemctl start mysqld.service\n......\n#systemctl enable mysqld\n......\n<\/pre><\/div>\n\n\n<p>\u67e5\u770b\u521d\u59cb\u5bc6\u7801\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#cat \/var\/log\/mysqld.log | grep password\n......\n<\/pre><\/div>\n\n\n<p>\u4fee\u6539\u521d\u59cb\u5bc6\u7801\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#mysql -u root -p\nEnter password:\n......\nServer version: 8.0.32 MySQL Community Server - GPL\n\nCopyright (c) 2000, 2023, Oracle and\/or its affiliates.\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 root@localhost IDENTIFIED WITH mysql_native_password BY &#039;****************&#039;;\n......\nmysql&gt;exit;\n<\/pre><\/div>\n\n\n<p>\u9000\u51fa\u540e\uff0c\u7136\u540e\u4f7f\u7528\u65b0\u5bc6\u7801\u91cd\u65b0\u767b\u9646\u3002\u5982\u679c\u53ef\u4ee5\u987a\u5229\u767b\u9646\uff0c\u5219\u8bc1\u660e\u5bc6\u7801\u4fee\u6539\u6210\u529f\u3002<\/p>\n\n\n\n<p>\u68c0\u67e5\u672c\u7248\u53f7\uff1a<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# mysql --version\nmysql  Ver 8.0.32 for Linux on x86_64 (MySQL Community Server - GPL)\n# mysqld --version\n\/usr\/sbin\/mysqld  Ver 8.0.32 for Linux on x86_64 (MySQL Community Server - GPL)\n<\/pre><\/div>\n\n\n<p>\u81f3\u6b64\uff0cMySql\u5b89\u88c5\u5347\u7ea7\u5b8c\u6210\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySql\u6570\u636e\u4e0eMariaDb\u6709\u51b2\u7a81\uff0c\u5347\u7ea7\u4e4b\u524d\u9700\u5148\u5378\u8f7dMariaDb\u3002 1 \u4e0b\u8f7dMySql \u4f7f\u7528\u6d4f\u89c8\u5668\u8bbf\u95eeMy [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[11,10,24],"class_list":["post-249","post","type-post","status-publish","format-standard","hentry","category-technology","tag-centos","tag-linux","tag-mysql"],"_links":{"self":[{"href":"http:\/\/www.algmain.com\/index.php\/wp-json\/wp\/v2\/posts\/249"}],"collection":[{"href":"http:\/\/www.algmain.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.algmain.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.algmain.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.algmain.com\/index.php\/wp-json\/wp\/v2\/comments?post=249"}],"version-history":[{"count":6,"href":"http:\/\/www.algmain.com\/index.php\/wp-json\/wp\/v2\/posts\/249\/revisions"}],"predecessor-version":[{"id":739,"href":"http:\/\/www.algmain.com\/index.php\/wp-json\/wp\/v2\/posts\/249\/revisions\/739"}],"wp:attachment":[{"href":"http:\/\/www.algmain.com\/index.php\/wp-json\/wp\/v2\/media?parent=249"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.algmain.com\/index.php\/wp-json\/wp\/v2\/categories?post=249"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.algmain.com\/index.php\/wp-json\/wp\/v2\/tags?post=249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}