{"id":5357,"date":"2020-07-29T22:16:47","date_gmt":"2020-07-29T14:16:47","guid":{"rendered":"http:\/\/39.97.231.10\/?p=5357"},"modified":"2020-07-29T22:16:47","modified_gmt":"2020-07-29T14:16:47","slug":"centos-7-%e6%ba%90%e7%a0%81%e7%bc%96%e8%af%91%e5%ae%89%e8%a3%85mysql-8-0","status":"publish","type":"post","link":"http:\/\/www.weijing.co\/?p=5357","title":{"rendered":"CentOS 7 \u6e90\u7801\u7f16\u8bd1\u5b89\u88c5MySQL 8.0"},"content":{"rendered":"<div class=\\\"blog_content\\\">\n<div class=\\\"blog_detail\\\">\n<div>\nMySQL\u662f\u4e00\u6b3e\u5f00\u6e90\u7684\u5173\u7cfb\u578b\u6570\u636e\u5e93\uff0c\u76ee\u524d\u6700\u65b0\u7684\u5927\u7248\u672c\u4e3a8.0\uff0c\u672c\u6587\u5c06\u4ecb\u7ecdCentOS 7.2\u73af\u5883\u4e0b\uff0c\u6e90\u7801\u7f16\u8bd1\u5b89\u88c5MySQL 8.0\u7684\u8fc7\u7a0b\u4ee5\u53ca\u9047\u5230\u7684\u95ee\u9898\u3002<br \/>\n<strong>\u73af\u5883\uff1a<\/strong><\/p>\n<ul>\n<li>CentOS 7.2<\/li>\n<li>MySQL 8.0.18<\/li>\n<\/ul>\n<h5>\u4e00\u3001\u4e0b\u8f7dMySQL 8.0 \u6e90\u7801<\/h5>\n<p>MySQL\u5b98\u65b9\u793e\u533a\u7248\uff1a<a href=\\\"https:\/\/github.com\/mysql\/mysql-server\\\">https:\/\/github.com\/mysql\/mysql-server<\/a><br \/>\nPercona Server for MySQL\u7248\u672c\uff1a<a href=\\\"https:\/\/github.com\/percona\/percona-server\\\">https:\/\/github.com\/percona\/percona-server<\/a><br \/>\n\u8fd9\u91cc\u6211\u4eec\u4f7f\u7528\u5b98\u65b9\u7248\u672c\uff0c\u4e0b\u8f7d8.0.18\u7248\u672c\u538b\u7f29\u5305\uff0c\u81ea\u5e26boost\u5e93\uff0c\u5982\u4e0b\uff1a<br \/>\nwget https:\/\/downloads.mysql.com\/archives\/get\/p\/23\/file\/mysql-boost-8.0.18.tar.gz<br \/>\n\u5f53\u7136\u4e5f\u53ef\u4ee5\u81ea\u5df1\u4e0b\u8f7dboost\u5e93\uff0c\u4e0d\u4f7f\u7528mysql\u81ea\u5e26\u7684boost\u5e93\uff0c\u5982\u4e0b\uff1a<br \/>\nwget https:\/\/dl.bintray.com\/boostorg\/release\/1.70.0\/source\/boost_1_70_0.tar.gz<\/p>\n<h5>\u4e8c\u3001\u5b89\u88c5\u914d\u7f6e\u7f16\u8bd1\u73af\u5883<\/h5>\n<p>yum install -y gcc gcc-c++ cmake3 gdb<br \/>\nyum install -y libaio bison zlib-devel openssl-devel patch ncurses-devel<br \/>\n<strong>\u6ce8\u610f\uff1a<\/strong><br \/>\nMySQL 8.0.18 \u4f9d\u8d56cmake 3.5.1\u53ca\u4ee5\u4e0a\u7248\u672c\uff0cGCC 5.3\u53ca\u4ee5\u4e0a\u7248\u672c\u3002<br \/>\n\u6e90\u7801\u7f16\u8bd1\u5b89\u88c5\u9ad8\u7248\u672ccmake\u548cgcc\u53c2\u8003\u6587\u7ae0\uff1a<\/p>\n<ul>\n<li><a href=\\\"http:\/\/mytecdb.com\/blogDetail.php?id=19\\\">CentOS 7 \u6e90\u7801\u7f16\u8bd1\u5b89\u88c5\u9ad8\u7248\u672c cmake<\/a><\/li>\n<li><a href=\\\"http:\/\/mytecdb.com\/blogDetail.php?id=21\\\">CentOS 7 \u6e90\u7801\u7f16\u8bd1\u5b89\u88c5\u9ad8\u7248\u672cGCC<\/a><\/li>\n<\/ul>\n<h5>\u4e09\u3001\u7f16\u8bd1\u5b89\u88c5<\/h5>\n<p><strong>\u89e3\u538b\uff1a<\/strong><br \/>\ntar xf mysql-boost-8.0.18.tar.gz<br \/>\ncd mysql-8.0.18<br \/>\n<strong>\u8bbe\u7f6e\u9ad8\u7248\u672cGCC\u73af\u5883\u53d8\u91cf\uff1a<\/strong><br \/>\n\u7531\u4e8e\u9ad8\u7248\u672cGCC\u5b89\u88c5\u5728\/usr\/local\u76ee\u5f55\u4e0b\uff0c\u8bbe\u7f6ecmake\u4f7f\u7528\u9ad8\u7248\u672cGCC\uff0c\u5982\u4e0b\uff1a<br \/>\nexport CC=\/usr\/local\/bin\/gcc<br \/>\nexport CXX=\/usr\/local\/bin\/g++<br \/>\n<strong>\u914d\u7f6e\u7f16\u8bd1\u9009\u9879\uff1a<\/strong><\/p>\n<pre><code>cmake -DCMAKE_INSTALL_PREFIX=\/data\/mysql_8_0_18\n-DWITH_MYISAM_STORAGE_ENGINE=1\n-DWITH_INNOBASE_STORAGE_ENGINE=1\n-DWITH_EDITLINE=bundled\n-DENABLED_LOCAL_INFILE=1\n-DWITH_NDBCLUSTER_STORAGE_ENGINE=OFF\n-DDOWNLOAD_BOOST=0\n-DWITH_BOOST=\/data\/boost\/boost_1_70_0\n-DFORCE_INSOURCE_BUILD=1\n-DWITH_PLUGIN_NDBCLUSTER=0\n-DWITH_ARCHIVE_STORAGE_ENGINE=0\n-DWITH_BLACKHOLE_STORAGE_ENGINE=0\n-DWITH_FEDERATED_STORAGE_ENGINE=0\n#\u7f16\u8bd1\u5b89\u88c5\nmake\nmake install\n<\/code><\/pre>\n<p>\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u9047\u5230\u5f88\u591a\u95ee\u9898\uff0c\u540e\u9762\u4f1a\u8be6\u7ec6\u63cf\u8ff0\uff0c\u6700\u7ec8\u7f16\u8bd1\u6210\u529f\uff0c\u5982\u4e0b\uff1a<\/p>\n<pre><code>[root@localhost mysql_8_0_18]# cd \/data\/mysql_8_0_18\/bin\/\n[root@localhost bin]# .\/mysqld --version\n\/data\/mysql_8_0_18\/bin\/mysqld\u00a0 Ver 8.0.18 for Linux on x86_64 (Source distribution)\n<\/code><\/pre>\n<h5>\u56db\u3001\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u7684\u62a5\u9519<\/h5>\n<p><strong>\u62a5\u9519\u4e00\uff1a<\/strong><br \/>\n\/lib64\/libstdc++.so.6: version `CXXABI_1.3.9\\&#8217; not found<br \/>\n\u89e3\u51b3\u65b9\u6848\uff1a<br \/>\n\u4f7f\u7528\u9ad8\u7248\u672cgcc\u52a8\u6001\u5e93<br \/>\nln -sf \/usr\/local\/lib64\/libstdc++.so.6 \/lib64\/libstdc++.so.6<br \/>\n<strong>\u62a5\u9519\u4e8c\uff1a<\/strong><br \/>\n[ 56%] Building CXX object sql\/CMakeFiles\/sql_gis.dir\/gis\/srs\/wkt_parser.cc.o<br \/>\ng++: fatal error: Killed signal terminated program cc1plus compilation terminated.<br \/>\n\u89e3\u51b3\u65b9\u6848\uff1a<br \/>\n\u865a\u62df\u673a\u5185\u5b581G\u592a\u5c0f\u4e86\uff0c\u8c03\u6574\u52302G\uff0c\u4e0d\u518d\u62a5\u9519\u3002<br \/>\n<strong>\u62a5\u9519\u4e09\uff1a<\/strong><br \/>\n\\&#8217;SYS_gettid\\&#8217; was not declared in this scope<br \/>\n\u4fee\u6539\u6587\u4ef6\u6e90\u7801\u6587\u4ef6\uff1a<br \/>\nmysql-8.0.18\/storage\/innobase\/buf\/buf0buf.cc<br \/>\n\u5728\u7b2c\u4e00\u884c\uff0c\u52a0\u4e0a\uff1a<br \/>\n#include \\&#8221;sys\/syscall.h\\&#8221;<br \/>\n<strong>\u62a5\u9519\u56db\uff1a<\/strong><br \/>\nerror: \u2018os_compare_and_swap_thread_id\u2019 was not declared<br \/>\n\u4fee\u6539\u4ee5\u4e0b\u6587\u4ef6\uff1a<br \/>\nmysql-8.0.18\/storage\/innobase\/lock\/lock0lock.cc<br \/>\nmysql-8.0.18\/storage\/innobase\/trx\/trx0trx.cc<br \/>\n\u5c06\\&#8221;os_compare_and_swap_thread_id\u201d \u4fee\u6539\u4e3a \\&#8221;os_compare_and_swap_lint\\&#8221;<\/p>\n<h5>\u4e94\u3001\u6700\u540e<\/h5>\n<p>MySQL 8.0 \u7684\u6e90\u7801\u7f16\u8bd1\u5e76\u4e0d\u987a\u5229\uff0c\u5176\u4e2d\u5bf9cmake\u548cgcc\u7248\u672c\u8981\u6c42\u8f83\u9ad8\uff0c\u7f16\u8bd1\u8fc7\u7a0b\u4e2d\u4f1a\u9047\u5230\u5404\u79cd\u5947\u602a\u7684\u95ee\u9898\u3002\u6700\u540e\uff0c\u5e0c\u671b\u672c\u6587\u5bf9\u5927\u5bb6\u7f16\u8bd1MySQL8.0\u6709\u5e2e\u52a9\u3002\n<\/p><\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>MySQL\u662f\u4e00\u6b3e\u5f00\u6e90\u7684\u5173\u7cfb\u578b\u6570\u636e\u5e93\uff0c\u76ee\u524d\u6700\u65b0\u7684\u5927\u7248\u672c\u4e3a8.0\uff0c\u672c\u6587\u5c06\u4ecb\u7ecdCentOS 7.2\u73af\u5883\u4e0b\uff0c\u6e90\u7801\u7f16\u8bd1\u5b89 &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"http:\/\/www.weijing.co\/?p=5357\"> <span class=\"screen-reader-text\">CentOS 7 \u6e90\u7801\u7f16\u8bd1\u5b89\u88c5MySQL 8.0<\/span> \u67e5\u770b\u5168\u6587 &raquo;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":""},"categories":[90,88],"tags":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"mailpoet_newsletter_max":false,"woocommerce_thumbnail":false,"woocommerce_single":false,"woocommerce_gallery_thumbnail":false,"shop_catalog":false,"shop_single":false,"shop_thumbnail":false},"uagb_author_info":{"display_name":"weijing","author_link":"http:\/\/www.weijing.co\/?author=4"},"uagb_comment_info":0,"uagb_excerpt":"MySQL\u662f\u4e00\u6b3e\u5f00\u6e90\u7684\u5173\u7cfb\u578b\u6570\u636e\u5e93\uff0c\u76ee\u524d\u6700\u65b0\u7684\u5927\u7248\u672c\u4e3a8.0\uff0c\u672c\u6587\u5c06\u4ecb\u7ecdCentOS 7.2\u73af\u5883\u4e0b\uff0c\u6e90\u7801\u7f16\u8bd1\u5b89&hellip;","_links":{"self":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/5357"}],"collection":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5357"}],"version-history":[{"count":0,"href":"http:\/\/www.weijing.co\/index.php?rest_route=\/wp\/v2\/posts\/5357\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5357"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.weijing.co\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}