{"id":1579,"date":"2010-03-22T20:47:24","date_gmt":"2010-03-22T12:47:24","guid":{"rendered":"http:\/\/www.orczhou.com\/?p=1579"},"modified":"2024-12-27T14:12:34","modified_gmt":"2024-12-27T06:12:34","slug":"innodb-plugin-setup","status":"publish","type":"post","link":"https:\/\/www.orczhou.com\/index.php\/2010\/03\/innodb-plugin-setup\/","title":{"rendered":"InnoDB Plugin\u5b89\u88c5"},"content":{"rendered":"\n<p>InnoDB Plugin\u8f83\u4e4bBuilt-in\u7248\u672c\u65b0\u589e\u4e86\u5f88\u591a\u7279\u6027\uff1a\u5305\u62ec\u5feb\u901fDDL\u3001\u538b\u7f29\u5b58\u50a8\u7b49\uff0c\u800c\u4e14\u5f15\u5165\u4e86\u5168\u65b0\u7684\u6587\u4ef6\u683c\u5f0fBarracuda\u3002<a href=\"http:\/\/www.google.com\/search?hl=en&amp;source=hp&amp;q=innodb+plugin+benchmark&amp;aq=f&amp;aqi=&amp;aql=&amp;oq=&amp;gs_rfai=\">\u4f17\u591a\u6d4b\u8bd5<\/a>\u4e5f\u8868\u660e\uff0cPlugin\u5728\u5f88\u591a\u65b9\u9762\u4f18\u4e8eBuilt-in\u7248\u672c\u3002\u5f53\u524dPlugin\u7248\u672c\u662f1.0.6\uff0c\u4e00\u4e2aRC\u7248\u672c\u3002MySQL\u7684\u5b98\u65b9\u7248\u672c\u4e2d\u4ece5.1.42\u5f00\u59cb\u4e5f\u5185\u7f6e\u4e86InnoDB Plugin1.0.6\u3002<\/p>\n\n\n\n<p>\u8fd9\u91cc\u7b80\u5355\u7684\u4ecb\u7ecdInnoDB Plugin\u7684<strong>\u7f16\u8bd1\u5b89\u88c5<\/strong>\u3002<\/p>\n\n\n\n\n\n\n<h4 class=\"wp-block-heading\"><span style=\"color: red;\">\u4e0b\u8f7d\u6e90\u7801<\/span><\/h4>\n\n\n\n<p>\u8fd9\u91cc\u4f7f\u7528MySQL5.1.45\u548cInnoDB Plugin1.0.6\u7248\u672c\u5b89\u88c5\u3002\u9700\u8981\u5355\u72ec\u4e0b\u8f7dMySQL\u548cInnoDB Plugin\u7684\u6e90\u7801\uff1a<a href=\"http:\/\/dev.mysql.com\/downloads\/mysql\/\">MySQL Community Server<\/a> \u548c <a href=\"http:\/\/www.innodb.com\/wp\/products\/innodb_plugin\/download\/\">InnoDB Plugin<\/a><\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><span style=\"color: red;\">\u89e3\u538b\u5e76\u66ff\u4ee3\u6e90\u7801<\/span><\/h4>\n\n\n\n<p>\u6211\u4eec\u9700\u8981\u4f7f\u7528\u4e0b\u8f7d\u7684Plugin\u6e90\u7801\u4ee3\u66ffMySQL\u6e90\u7801\u4e2d\u7684storage\/innobase\u76ee\u5f55\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">tar zxvf mysql-5.1.45.tar.gz\n$tar zxvf innodb_plugin-1.0.6.tar.gz\n$rm -rf mysql-5.1.45\/storage\/innobase\n$mv innodb_plugin-1.0.6 mysql-5.1.45\/storage\/innobase<\/code><\/pre>\n\n\n\n<!--more-->\n\n\n\n<h4 class=\"wp-block-heading\"><span style=\"color: red;\">\u7f16\u8bd1\u5e76\u5b89\u88c5<\/span><\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$.\/configure --prefix=\/opt\/mysql --with-extra-charsets=all \\\n>--with-plugins=csv,innobase,myisam,heap\n$make &amp;&amp; make install\n$cd \/opt\/mysql\n$.\/bin\/mysql_install_db --basedir=\/opt\/mysql         #\u521d\u59cb\u5316\u6570\u636e\uff08\u6743\u9650\u8868\u7b49\uff09\n$vi \/etc\/my.cnf         #\u521d\u59cb\u5316\u4f60\u7684\u914d\u7f6e\u6587\u4ef6\n$.\/bin\/mysqld_safe &amp;         #\u542f\u52a8\u6570\u636e\u5e93<\/code><\/pre>\n\n\n\n<p>\u8fd9\u91cc\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5982\u679c\u60f3\u4f7f\u7528InnoDB\u7684Barracuda\u6587\u4ef6\u683c\u5f0f\uff0c\u9700\u8981\u5728\u914d\u7f6e\u6587\u4ef6my.cnf\u65b0\u589e\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"apacheconf\" class=\"language-apacheconf\">loose_innodb_file_format=barracuda\nloose_innodb_strict_mode=1<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span style=\"color: red;\">\u67e5\u770b\u7248\u672c<\/span><\/h4>\n\n\n\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u5982\u4e0b\u547d\u4ee4\u67e5\u770b\u5f53\u524d\u7248\u672c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">root@(none) 10:49:15>select @@innodb_version;\n+------------------+\n| @@innodb_version |\n+------------------+\n| 1.0.6            |\n+------------------+\n1 row in set (0.00 sec)\nroot@(none) 10:51:10>show plugins;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\"><span style=\"color: red;\">\u66f4\u591a\u5173\u4e8e\u5b89\u88c5<\/span><\/h4>\n\n\n\n<p>\u4e0a\u9762\u6f14\u793a\u7684\u662f\u4f7f\u7528InnoDB Plugin\u6e90\u7801\u8986\u76d6MySQL\u6e90\u7801\uff08.\/storage\/innobase\uff09\u7684\u65b9\u5f0f\u5b89\u88c5\u3002\u4e8b\u5b9e\u4e0a\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528MySQL5.1.45\u81ea\u5e26\u7684InnoDB Plugin\u4ee3\u7801\u5b89\u88c5\uff0c\u65e0\u9700\u518d\u5355\u72ec\u4e0b\u8f7dInnoDB Plugin\u6e90\u7801\u3002\u8fd9\u79cd\u5b89\u88c5\uff0c\u4f1a\u540c\u65f6\u5b89\u88c5\u4e24\u4e2aInnoDB\u7248\u672c\uff1aBuilt-in\u548cPlugin\uff0c\u542f\u52a8\u65f6\u9700\u8981\u7279\u522b\u6ce8\u610f\u3002<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u76f4\u63a5\u89e3\u538bMySQL\u5e76\u7f16\u8bd1\u5b89\u88c5<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">$.\/configure --prefix=\/opt\/mysql --with-extra-charsets=all \\\n> --with-plugins=csv,innobase,innodb_plugin,myisam,heap\n$make &amp;&amp; make install\n$cd \/opt\/mysql\n$.\/bin\/mysql_install_db --basedir=\/opt\/mysql         #\u521d\u59cb\u5316\u6570\u636e\uff08\u6743\u9650\u8868\u7b49\uff09\n$vi \/etc\/my.cnf         #\u521d\u59cb\u5316\u4f60\u7684\u914d\u7f6e\u6587\u4ef6<\/code><\/pre>\n\n\n\n<p>\uff08\u7f16\u8bd1\u53c2\u6570\u4e2d\uff0cwith-plugins\u90e8\u5206\u65b0\u589e\u4e86innodb_plugin\u90e8\u5206\uff09<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u51c6\u5907\u52a0\u8f7dInnoDB Plugin\u63d2\u4ef6<\/h5>\n\n\n\n<p>\u8fd9\u4e00\u6b65\u662f\u6bd4\u8f83\u590d\u6742\u7684\uff0c\u4e3a\u4e86\u52a0\u8f7dPlugin\uff0c\u9700\u8981\u5148\u5c06built-in\u7981\u7528\u3002\u9996\u5148\u5c06\u914d\u7f6e\u914d\u7f6e\u6587\u4ef6\u4e2d\u6240\u6709innodb\u76f8\u5173\u7684\u9009\u62e9\u6ce8\u91ca\u6389\uff08\u4e5f\u53ef\u4ee5\u4f7f\u7528loose\u524d\u7f00\uff09;\u7136\u540e\u5728\u914d\u7f6e\u6587\u4ef6\u4e2d\u6dfb\u52a0\u5ffd\u7565InnoDB built-in\u7684\u53c2\u6570\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"apacheconf\" class=\"language-apacheconf\">ignore_builtin_innodb    #\u5ffd\u7565InnoDB built-in\n\n#\u6ce8\u91caInnoDB\u9009\u62e9\n#innodb_flush_method = O_DIRECT\n#innodb_file_per_table = 1\n#innodb_flush_log_at_trx_commit = 2\n#innodb_lock_wait_timeout = 100\n......<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">\u542f\u52a8MySQL\u5e76\u52a0\u8f7dInnoDB Plugin<\/h5>\n\n\n\n<p>\u8fd9\u91cc\u9700\u8981\u767b\u5165MySQL\u5e76\u624b\u52a8\u52a0\u8f7dPlugin\u76f8\u5173\u7684\u63d2\u4ef6\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">$.\/bin\/mysqld_safe &amp;         #\u542f\u52a8\u6570\u636e\u5e93\n$mysql -uroot\nroot>INSTALL PLUGIN INNODB SONAME 'ha_innodb_plugin.so'; \nroot>INSTALL PLUGIN INNODB_TRX SONAME 'ha_innodb_plugin.so'; \nroot>INSTALL PLUGIN INNODB_LOCKS SONAME 'ha_innodb_plugin.so';\nroot>INSTALL PLUGIN INNODB_LOCK_WAITS SONAME 'ha_innodb_plugin.so'; \nroot>INSTALL PLUGIN INNODB_CMP SONAME 'ha_innodb_plugin.so'; \nroot>INSTALL PLUGIN INNODB_CMP_RESET SONAME 'ha_innodb_plugin.so'; \nroot>INSTALL PLUGIN INNODB_CMPMEM SONAME 'ha_innodb_plugin.so'; \nroot>INSTALL PLUGIN INNODB_CMPMEM_RESET SONAME 'ha_innodb_plugin.so'<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h5 class=\"wp-block-heading\">\u67e5\u770b\u7248\u672c<\/h5>\n\n\n\n<p>\u5b89\u88c5\u5b8c\u6210\uff0c\u53ef\u4ee5\u901a\u8fc7\u5982\u4e0b\u547d\u4ee4\u67e5\u770b\u5b89\u88c5\u662f\u5426\u6210\u529f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">root>select @@innodb_version;\n+------------------+\n| @@innodb_version |\n+------------------+\n| 1.0.6            |\n+------------------+\n1 row in set (0.00 sec)\nroot>show plugins;\n......<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>InnoDB Plugin\u8f83\u4e4bBuilt-in\u7248\u672c\u65b0\u589e\u4e86\u5f88\u591a\u7279\u6027\uff1a\u5305\u62ec\u5feb\u901fDDL\u3001\u538b\u7f29\u5b58\u50a8\u7b49\uff0c\u800c\u4e14\u5f15\u5165\u4e86\u5168\u65b0\u7684\u6587\u4ef6\u683c\u5f0fBarracuda\u3002\u4f17\u591a\u6d4b\u8bd5\u4e5f\u8868\u660e\uff0cPlugin\u5728\u5f88\u591a\u65b9\u9762\u4f18\u4e8eBuilt-in\u7248\u672c\u3002\u5f53\u524dPlugin\u7248\u672c\u662f1.0.6\uff0c\u4e00\u4e2aRC\u7248\u672c\u3002MySQL\u7684\u5b98\u65b9\u7248\u672c\u4e2d\u4ece5.1.42\u5f00\u59cb\u4e5f\u5185\u7f6e\u4e86InnoDB Plugin1.0.6\u3002 \u8fd9\u91cc\u7b80\u5355\u7684\u4ecb\u7ecdInnoDB Plugin\u7684\u7f16\u8bd1\u5b89\u88c5\u3002 \u4e0b\u8f7d\u6e90\u7801 \u8fd9\u91cc\u4f7f\u7528MySQL5.1.45\u548cInnoDB Plugin1.0.6\u7248\u672c\u5b89\u88c5\u3002\u9700\u8981\u5355\u72ec\u4e0b\u8f7dMySQL\u548cInnoDB Plugin\u7684\u6e90\u7801\uff1aMySQL Community Server \u548c InnoDB Plugin \u89e3\u538b\u5e76\u66ff\u4ee3\u6e90\u7801 \u6211\u4eec\u9700\u8981\u4f7f\u7528\u4e0b\u8f7d\u7684Plugin\u6e90\u7801\u4ee3\u66ffMySQL\u6e90\u7801\u4e2d\u7684storage\/innobase\u76ee\u5f55\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","inline_featured_image":false,"_tocer_settings":[],"footnotes":""},"categories":[6],"tags":[52],"class_list":["post-1579","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-innodb-plugin"],"_links":{"self":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/1579","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/comments?post=1579"}],"version-history":[{"count":32,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/1579\/revisions"}],"predecessor-version":[{"id":16883,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/posts\/1579\/revisions\/16883"}],"wp:attachment":[{"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/media?parent=1579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/categories?post=1579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.orczhou.com\/index.php\/wp-json\/wp\/v2\/tags?post=1579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}