{"id":82,"date":"2015-11-25T11:34:08","date_gmt":"2015-11-25T03:34:08","guid":{"rendered":"https:\/\/blog.espnlol.com\/?p=82"},"modified":"2015-11-25T11:34:08","modified_gmt":"2015-11-25T03:34:08","slug":"%e7%bc%96%e8%af%91%e5%ae%89%e8%a3%85percona-mysql-5-6-26","status":"publish","type":"post","link":"https:\/\/blog.espnlol.com\/?p=82","title":{"rendered":"\u7f16\u8bd1\u5b89\u88c5Percona MySQL 5.6.26"},"content":{"rendered":"<h3><strong>Percona<\/strong><\/h3>\n<h3><strong>\u4e0e\u5185\u7f6e\u7684MySQL\u5b58\u50a8\u5f15\u64ce\u76f8\u6bd4\uff0cXtraDB\u63d0\u4f9b\u4e86\u4e00\u4e9b\u6781\u5927\u7684\u6539\u8fdb\uff0c\u4f46\u5b83\u4e0d\u662f\u4e00\u6b3e\u72ec\u7acb\u4ea7\u54c1\uff0c\u4e5f\u65e0\u6cd5\u8f7b\u677e\u653e\u5165\u73b0\u6709MySQL\u5b89\u88c5\u3002\u56e0\u6b64\uff0c\u5982\u679c\u60a8\u60f3\u4f7f\u7528\u8fd9\u6b3e\u65b0\u5f15\u64ce\uff0c\u5219\u5fc5\u987b\u4f7f\u7528\u63d0\u4f9b\u5b83\u7684\u4ea7\u54c1\u3002<\/strong><\/h3>\n<h3><strong>Percona Server\u5c31\u662f\u8fd9\u6837\u4e00\u6b3e\u4ea7\u54c1\uff0c\u7531\u9886\u5148\u7684MySQL\u54a8\u8be2\u516c\u53f8Percona\u53d1\u5e03\u3002Percona Server\u662f\u4e00\u6b3e\u72ec\u7acb\u7684\u6570\u636e\u5e93\u4ea7\u54c1\uff0c\u4e3a\u7528\u6237\u63d0\u4f9b\u4e86\u6362\u51fa\u5176MySQL\u5b89\u88c5\u5e76\u6362\u5165Percona Server\u4ea7\u54c1\u7684\u80fd\u529b\u3002\u901a\u8fc7\u8fd9\u6837\u505a\uff0c\u5c31\u53ef\u4ee5\u5229\u7528XtraDB\u5b58\u50a8\u5f15\u64ce\u3002Percona Server\u58f0\u79f0\u53ef\u4ee5\u5b8c\u5168\u4e0eMySQL\u517c\u5bb9\uff0c\u56e0\u6b64\u4ece\u7406\u8bba\u4e0a\u8bb2\uff0c\u60a8\u65e0\u9700\u66f4\u6539\u8f6f\u4ef6\u4e2d\u7684\u4efb\u4f55\u4ee3\u7801\u3002\u8fd9\u786e\u5b9e\u662f\u4e00\u4e2a\u5f88\u5927\u7684\u4f18\u52bf\uff0c\u9002\u5408\u5728\u60a8\u5bfb\u627e\u5feb\u901f\u6027\u80fd\u6539\u8fdb\u65f6\u63a7\u5236\u8d28 \u91cf\u3002\u56e0\u6b64\uff0c\u91c7\u7528Percona Server\u7684\u4e00\u4e2a\u5f88\u597d\u7684\u7406\u7531\u662f\uff0c\u5229\u7528XtraDB\u5f15\u64ce\u6765\u5c3d\u53ef\u80fd\u5730\u51cf\u5c11\u4ee3\u7801\u66f4\u6539\u3002<\/strong><\/h3>\n<h3><strong>\u6b64\u5916\uff0c\u4ed6\u4eec\u662fXtraDB\u5b58\u50a8\u5f15\u64ce\u7684\u539f\u4f5c\u8005\u3002Percona\u5c06\u6b64\u4ee3\u7801\u7528\u4f5c\u5f00\u6e90\u4ee3\u7801\uff0c\u56e0\u6b64\u60a8\u53ef\u4ee5\u5728\u5176\u4ed6\u4ea7\u54c1\u4e2d\u627e\u5230\u5b83\uff0c\u4f46\u5f15\u64ce\u7684\u6700\u521d\u521b\u5efa\u8005\u4e0e\u7f16\u5199\u6b64\u4ea7\u54c1\u7684\u662f\u540c\u4e00\u4e2a\u4eba\uff0c\u6240\u4ee5\u60a8\u53ef\u4ee5\u968f\u5fc3\u6240\u6b32\u5730\u4f7f\u7528\u6b64\u4fe1\u606f\u3002<\/strong><\/h3>\n<h3><strong>\u4e0b\u9762\u662fPercona Server\u7684\u58f0\u660e\uff0c\u8be5\u58f0\u660e\u6765\u81ea\u5b83\u4eec\u81ea\u5df1\u7684\u7f51\u7ad9\uff1a<\/strong><\/h3>\n<ul>\n<li>\n<h3><strong>\u53ef\u6269\u5c55\u6027\uff1a\u5904\u7406\u66f4\u591a\u4e8b\u52a1\uff1b\u5728\u5f3a\u5927\u7684\u670d\u52a1\u5668\u4e0a\u8fdb\u884c\u6269\u5c55<\/strong><\/h3>\n<\/li>\n<li>\n<h3><strong>\u6027\u80fd\uff1a\u4f7f\u7528\u4e86XtraDB\u7684Percona Server\u901f\u5ea6\u975e\u5e38\u5feb<\/strong><\/h3>\n<\/li>\n<li>\n<h3><strong>\u53ef\u9760\u6027\uff1a\u907f\u514d\u635f\u574f\uff0c\u63d0\u4f9b\u5d29\u6e83\u5b89\u5168(crash-safe)\u590d\u5236<\/strong><\/h3>\n<\/li>\n<li>\n<h3><strong>\u7ba1\u7406\uff1a\u5728\u7ebf\u5907\u4efd\uff0c\u5728\u7ebf\u8868\u683c\u5bfc\u5165\/\u5bfc\u51fa<\/strong><\/h3>\n<\/li>\n<li>\n<h3><strong>\u8bca\u65ad\uff1a\u9ad8\u7ea7\u5206\u6790\u548c\u68c0\u6d4b<\/strong><\/h3>\n<\/li>\n<li>\n<h3><strong>\u7075\u6d3b\u6027\uff1a\u53ef\u53d8\u7684\u9875\u9762\u5927\u5c0f\uff0c\u6539\u8fdb\u7684\u7f13\u51b2\u6c60\u7ba1\u7406<\/strong><\/h3>\n<\/li>\n<\/ul>\n<h3><strong>Percona\u56e2\u961f\u7684\u6700\u7ec8\u58f0\u660e\u662f\u201cPercona Server\u662f\u7531Oracle\u53d1\u5e03\u7684\u6700\u63a5\u8fd1\u5b98\u65b9MySQL Enterprise\u53d1\u884c\u7248\u7684\u7248\u672c\u201d\uff0c\u56e0\u6b64\u4e0e\u5176\u4ed6\u66f4\u6539\u4e86\u5927\u91cf\u57fa\u672c\u6838\u5fc3MySQL\u4ee3\u7801\u7684\u5206\u652f\u6709\u6240\u533a\u522b\u3002Percona Server\u7684\u4e00\u4e2a\u7f3a\u70b9\u662f\u4ed6\u4eec\u81ea\u5df1\u7ba1\u7406\u4ee3\u7801\uff0c\u4e0d\u63a5\u53d7\u5916\u90e8\u5f00\u53d1\u4eba\u5458\u7684\u8d21\u732e\uff0c\u4ee5\u8fd9\u79cd\u65b9\u5f0f\u786e\u4fdd\u4ed6\u4eec\u5bf9\u4ea7\u54c1\u4e2d\u6240\u5305\u542b\u529f\u80fd\u7684\u63a7\u5236\u3002<\/strong><\/h3>\n<p>1\uff0c\u5b89\u88c5\u6570\u636e\u5e93<\/p>\n<p>\/\/ \u5b89\u88c5\u5fc5\u987b\u8f6f\u4ef6\u5305<\/p>\n<pre class=\"lang:vim decode:true \">yum install gcc-c++ make cmake bison bison-devel ncurses-devel libaio-devel perl perl-Data-Dumper readline-devel -y<\/pre>\n<p>\/\/ \u4e0b\u8f7d\u7f16\u8bd1\u5b89\u88c5<\/p>\n<pre class=\"lang:vim decode:true \">wget https:\/\/www.percona.com\/downloads\/Percona-Server-5.6\/Percona-Server-5.6.26-74.0\/source\/tarball\/percona-server-5.6.26-74.0.tar.gz\r\ntar xf percona-server-5.6.26-74.0.tar.gz \r\ncd percona-server-5.6.26-74.0\r\ncmake -DCMAKE_INSTALL_PREFIX=\/usr\/local\/mysql5.6.26-74.0 -DMYSQL_UNIX_ADDR=\/tmp\/mysql.sock -DDEFAULT_CHARSET=utf8 -DENABLE_DTRACE=0 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS:STRING=utf8,gbk,all -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=\/home\/mysql5.6.26-74.0\/data -DMYSQL_TCP_PORT=3306\r\n\r\ncd \/usr\/local\/\r\nln -s mysql5.6.26-74.0 mysql\r\nln -s \/usr\/local\/mysql\/lib\/libperconaserverclient.so.18.1.0 \/usr\/local\/mysql\/lib\/libmysqlclient_r.so\r\nln -s \/usr\/local\/mysql\/lib\/libperconaserverclient.so.18.1.0 \/usr\/lib\/libmysqlclient_r.so\r\nln -s \/usr\/local\/mysql\/lib\/libperconaserverclient.so.18.1.0 \/usr\/lib64\/libmysqlclient_r.so\r\nln -s \/usr\/local\/mysql\/bin\/* \/usr\/bin\r\n\r\nmkdir -p \/home\/data\/mysql5.6.26-74.0\/data\r\nmkdir -p \/home\/data\/innodata\/\r\nmkdir -p \/home\/data\/mysqllogs\/{bin-log,slow-log}\r\nchown -R mysql.mysql \/home\/data\/mysql5.6.26-74.0\r\nchown -R mysql.mysql \/home\/data\/mysql5.6.26-74.0\/data\r\nchown -R mysql.mysql \/home\/data\/innodata\/\r\nchown -R mysql.mysql \/home\/data\/mysqllogs<\/pre>\n<p>2\uff0c\u7f16\u5199\u914d\u7f6e\u6587\u4ef6<\/p>\n<pre class=\"lang:vim decode:true \">vi \/etc\/my.cnf\r\n[mysqld]\r\nport = 3306\r\nsocket = \/tmp\/mysql.sock\r\ndatadir = \/home\/data\/mysql5.6.26-74.0\/data\r\npid-file = \/home\/data\/mysql5.6.26-74.0\/data\/li849-147.pid\r\n\r\n[mysqldump]\r\nquick;\r\nmax_allowed_packet = 16M\r\n\r\n\r\n[mysql]\r\nno-auto-rehash\r\n\r\n[myisamchk]\r\nkey_buffer_size = 20M\r\nsort_buffer_size = 20M\r\nread_buffer = 4M\r\nwrite_buffer = 4M<\/pre>\n<p>3\uff0c\u521d\u59cb\u5316\u6570\u636e\u5e93<\/p>\n<pre class=\"lang:vim decode:true \">cd \/usr\/local\/mysql\r\n.\/scripts\/mysql_install_db --user=mysql --datadir=\/home\/data\/mysql5.6.26-74.0\/data\r\ncp support-files\/mysql.server \/etc\/init.d\/mysqld<\/pre>\n<p>4\uff0c\u5b89\u88c5\u5934\u6587\u4ef6\uff08\u8fd9\u4e2a\u5fc5\u987b\uff0c\u4e0d\u7136\u4f1a\u906d\u9047\u5f88\u591a\u9ebb\u70e6\uff09<\/p>\n<pre class=\"lang:vim decode:true \">wget http:\/\/www.espnlol.com\/xx\/download\/mysql\/Percona-XtraDB-Cluster-devel-55-5.5.41-25.11.853.el6.x86_64.rpm\r\nrpm -ivh Percona-XtraDB-Cluster-devel-55-5.5.41-25.11.853.el6.x86_64.rpm<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Percona \u4e0e\u5185\u7f6e\u7684MySQL\u5b58\u50a8\u5f15\u64ce\u76f8\u6bd4\uff0cXtraDB\u63d0\u4f9b\u4e86\u4e00\u4e9b\u6781\u5927\u7684\u6539\u8fdb &hellip; <a href=\"https:\/\/blog.espnlol.com\/?p=82\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-82","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=\/wp\/v2\/posts\/82","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=82"}],"version-history":[{"count":1,"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=\/wp\/v2\/posts\/82\/revisions"}],"predecessor-version":[{"id":83,"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=\/wp\/v2\/posts\/82\/revisions\/83"}],"wp:attachment":[{"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=82"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=82"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.espnlol.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=82"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}