使用InnoDB替代XtraDB

默认MariaDB 10.1和更早的版本会和XtraDB一起编译为默认版本。从MariaDB 10.2开始,InnoDB是默认的存储引擎。

MariaDB starting with 5.5

MariaDB 5.5开始,所有MariaDB标准发行版也会包括InnoDB插件。

要使用InnoDB插件替换XtraDB,你可以在my.cnf文件中添加:

[mysqld]
ignore_builtin_innodb
plugin_load=ha_innodb.so
# 如果你使用软件包安装的mariadb,则不需要下面这行:
plugin_dir=/usr/local/mysql/lib/mysql/plugin
MariaDB until 5.3

对于MariaDB 5.3和更低的版本,所使用的库名为ha_innodb_plugin.so

你可能会基于以下几种原因使用InnoDB替代XtraDB:

  • 你想要在InnoDB/XtraDB之间做压力测试比较性能
  • 你在XtraDB中遇到了Bug
  • 你在XtraDB中遇到了表空间崩溃且无法恢复的问题。在某些情况下,InnoDB在数据恢复方面更好些。

See Also

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.