Mysql

MariaDB 和 XtraDB/InnoDB 外掛

  • July 23, 2014

在我的 vps 中,我想從 MySQL 切換到 MariaDB(使用 Monty 的 Debian Squeeze 儲存庫)。將 my.cnf 從 MySQL 複製到 MariaDB,我看到新的配置文件(MariaDB 包中的那個)沒有提到任何外掛命令,例如 MySQL 中的舊配置文件,我在其中載入了 InnoDB 外掛。現在,我了解到 XtraDB 已經成為 MariaDB 中預設的 ACID 儲存引擎,取代了 InnoDB。由於我發現 MariaDB 站點的文件在這方面缺乏,我需要在新的 my.cnf 中添加一些額外的東西來啟動 XtraDB 還是預設啟動?show plugins返回這個:

MariaDB [(none)]> show plugins;
+--------------------------------+--------+--------------------+---------+---------+
| Name                           | Status | Type               | Library | License |
+--------------------------------+--------+--------------------+---------+---------+
| binlog                         | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| mysql_native_password          | ACTIVE | AUTHENTICATION     | NULL    | GPL     |
| mysql_old_password             | ACTIVE | AUTHENTICATION     | NULL    | GPL     |
| MyISAM                         | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| partition                      | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| ARCHIVE                        | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| BLACKHOLE                      | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| CSV                            | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| FEDERATED                      | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| MEMORY                         | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| Aria                           | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| MRG_MYISAM                     | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| PBXT                           | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| PBXT_STATISTICS                | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| InnoDB                         | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| INNODB_RSEG                    | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_BUFFER_POOL_PAGES       | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_BUFFER_POOL_PAGES_INDEX | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_BUFFER_POOL_PAGES_BLOB  | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_TRX                     | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_LOCKS                   | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_LOCK_WAITS              | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMP                     | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMP_RESET               | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMPMEM                  | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMPMEM_RESET            | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_TABLE_STATS             | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_INDEX_STATS             | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| XTRADB_ADMIN_COMMAND           | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_SYS_TABLES              | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_SYS_INDEXES             | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_SYS_STATS               | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| XTRADB_ENHANCEMENTS            | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
+--------------------------------+--------+--------------------+---------+---------+
33 rows in set (0.00 sec)

我從上面的輸出中理解了什麼?那個 InnoDB=XtraDB?

如您的 所示SHOW PLUGINS;,存在 InnoDB。XtraDB 也存在。

如果你想確定,你必須執行SHOW ENGINES;. 這將顯示預設的儲存引擎。XtraDB 外掛處於活動狀態的事實表明必須使用 XtraDB。

引用自:https://dba.stackexchange.com/questions/25460