{"id":90,"date":"2019-05-07T15:39:16","date_gmt":"2019-05-07T07:39:16","guid":{"rendered":"http:\/\/www.luyouli.com\/?p=90"},"modified":"2019-05-09T10:34:25","modified_gmt":"2019-05-09T02:34:25","slug":"centos-7-%e7%bc%96%e8%af%91%e5%ae%89%e8%a3%85mysql-8-0-16","status":"publish","type":"post","link":"https:\/\/www.luyouli.com\/?p=90","title":{"rendered":"Centos 7 \u7f16\u8bd1\u5b89\u88c5MySql 8.0.16"},"content":{"rendered":"\n<p><p>\u4e4b\u524d\u6709\u4e00\u7bc7 Centos 7 \u7f16\u8bd1\u5b89\u88c5MySql 8.0.11\u7684\u6587\u7ae0\uff0c\u6700\u8fd1MySql\u53d1\u5e03\u4e868.0.16\uff0c\u53d1\u73b0\u7f16\u8bd1\u5b89\u88c5\u8ddf\u4e4b\u524d\u4e0d\u592a\u4e00\u6837\uff0c\u6240\u4ee5\u8bb0\u5f55\u4e00\u4e0b\uff0c\u95f2\u8bdd\u5c11\u53d9\uff0c\u5f00\u6574\u3002<\/p>\n<!--more--><\/p>\n\n\n\n<p>\u5b98\u65b9\u7f16\u8bd1\u5b89\u88c5\u9700\u6c42\uff1a<a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/source-installation.html\">https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/source-installation.html<\/a><\/p>\n\n\n\n<p>\u5176\u4e2d\u5bf9\u4e8eGCC\u7684\u7248\u672c\u8981\u6c42\u4ece 4.8 \u63d0\u5347\u5230\u4e86 5.3+ \uff0c\u5e76\u4e14\u5f03\u7528cmake\u6539\u7528cmake3\uff0c\u6240\u4ee5\u7f16\u8bd1\u5b89\u88c5\u7b2c\u4e00\u6b65\u5c31\u662f\u5347\u7ea7GCC\u7684\u7248\u672c\u548c\u5b89\u88c5cmake3<\/p>\n\n\n\n<p>1\u3001\u5b89\u88c5gcc 8.2 \u53cacmake3<\/p>\n\n\n\n<p># yum install epel-release<\/p>\n\n\n\n<p># yum install cmake3 centos-release-scl scl-utils-build    # \u5b89\u88c5centos-release-scl <\/p>\n\n\n\n<p># yum list all &#8211;enablerepo=&#8217;centos-sclo-rh&#8217;| grep devtoolset       # \u67e5\u770b\u53ef\u4ee5\u5b89\u88c5\u7684GCC\u7248\u672c <\/p>\n\n\n\n<p># yum install devtoolset-8-gcc.x86_64 devtoolset-8-gcc-c++.x86_64 devtoolset-8-gcc-gdb-plugin.x86_64      # \u4e00\u6b65\u5230\u4f4d\u5b89\u88c5GCC 8.2 <\/p>\n\n\n\n<p> # mv \/usr\/bin\/gcc \/usr\/bin\/gcc.4.8.5             # \u5907\u4efdgcc 4.8.5\u7684\u7248\u672c<\/p>\n\n\n\n<p># mv \/usr\/bin\/gcc-ar \/usr\/bin\/gcc-ar.4.8.5<\/p>\n\n\n\n<p># mv \/usr\/bin\/gcc-nm \/usr\/bin\/gcc-nm.4.8.5 <\/p>\n\n\n\n<p># mv \/usr\/bin\/gcc-ranlib \/usr\/bin\/gcc-ranlib.4.8.5 <\/p>\n\n\n\n<p># mv \/usr\/bin\/c++ \/usr\/bin\/c++.4.8.5 <\/p>\n\n\n\n<p># mv \/usr\/bin\/c++filt \/usr\/bin\/c++filt.4.8.5 <\/p>\n\n\n\n<p># ln -s \/opt\/rh\/devtoolset-8\/root\/usr\/bin\/* \/usr\/bin\/       # \u8f6f\u8fde\u63a5\u65b0\u7248GCC <\/p>\n\n\n\n<p># gcc -v        # \u67e5\u770bGCC\u7248\u672c <\/p>\n\n\n\n<p>2\u3001\u7f16\u8bd1\u5b89\u88c5MySql 8.0.16<\/p>\n\n\n\n<p># wget https:\/\/cdn.mysql.com\/\/Downloads\/MySQL-8.0\/mysql-boost-8.0.16.tar.gz &amp;&amp; tar zxvf  mysql-boost-8.0.16.tar.gz &amp;&amp; cd mysql-boost-8.0.16<\/p>\n\n\n\n<p># cmake3 -DCMAKE_INSTALL_PREFIX=\/mysql\/ -DMYSQL_DATADIR=\/data\/mysql -DSYSCONFDIR=\/etc -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8mb4_general_ci -DDOWNLOAD_BOOST=1 -DWITH_BOOST=\/software -DWITH_ARCHIVE_STORAGE_ENGINE=1  -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DWITH_DEBUG=0 -DWITH_SSL=systemABLE_DTRACE=0 -DWITH_SSL=system -DFORCE_INSOURCE_BUILD=1 <\/p>\n\n\n\n<p> -DFORCE_INSOURCE_BUILD=<strong><em>bool<\/em><\/strong>\u5b9a\u4e49\u662f\u5426\u5f3a\u5236\u8fdb\u884c\u6e90\u5185\u6784\u5efa\u3002\u5efa\u8bae\u4f7f\u7528\u6e90\u5916\u6784\u5efa\uff0c\u56e0\u4e3a\u5b83\u4eec\u5141\u8bb8\u6765\u81ea\u540c\u4e00\u6e90\u7684\u591a\u4e2a\u6784\u5efa\uff0c\u5e76\u4e14\u53ef\u4ee5\u901a\u8fc7\u5220\u9664\u6784\u5efa\u76ee\u5f55\u6765\u5feb\u901f\u6267\u884c\u6e05\u7406\u3002\u8981\u5f3a\u5236\u5728\u4ee3\u7801\u6784\u5efa\uff0c\u8c03\u7528<strong>CMake\u7684<\/strong>\u4f7f\u7528&nbsp;<\/p>\n\n\n\n<p><a href=\"https:\/\/dev.mysql.com\/doc\/refman\/8.0\/en\/source-configuration-options.html#option_cmake_force_insource_build\">-DFORCE_INSOURCE_BUILD=ON<\/a>\u3002 <\/p>\n\n\n\n<p> # make &amp;&amp; make install <\/p>\n\n\n\n<p>\u5269\u4f59\u7684\u5b89\u88c5\u6b65\u9aa4\u8bf7\u770b\u4e4b\u524d\u76848.0.11\u7684\u5b89\u88c5\u65b9\u6cd5<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e4b\u524d\u6709\u4e00\u7bc7 Centos 7 \u7f16\u8bd1\u5b89\u88c5MySql 8.0.11\u7684\u6587\u7ae0\uff0c\u6700\u8fd1MySql\u53d1\u5e03\u4e868.0.16\uff0c\u53d1\u73b0\u7f16 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-90","post","type-post","status-publish","format-standard","hentry","category-mysql"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"views":7760,"_links":{"self":[{"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/posts\/90","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=90"}],"version-history":[{"count":11,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/posts\/90\/revisions"}],"predecessor-version":[{"id":133,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=\/wp\/v2\/posts\/90\/revisions\/133"}],"wp:attachment":[{"href":"https:\/\/www.luyouli.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=90"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=90"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.luyouli.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=90"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}