YES支持并开启
DEFAULT支持并开启, 并且为默认引擎
NO不支持
DISABLED支持,但未开启
参考一下在windows下的解决办法,在my.cnf中增加一行
复制代码 代码如下:
federated
1. 查看当前支持的存储引擎
SQL>show engines;
复制代码 代码如下:
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| Engine| Support | Comment| Transactions | XA | Savepoints |
+------------+---------+------------------------------------------------------------+--------------+------+------------+
| CSV| YES| CSV storage engine| NO| NO | NO|
| MRG_MYISAM | YES| Collection of identical MyISAM tables| NO| NO | NO|
| MEMORY| YES| Hash based, stored in memory, useful for temporary tables | NO| NO | NO|
| InnoDB| DEFAULT | Supports transactions, row-level locking, and foreign keys | YES| YES | YES|
| MyISAM| YES| Default engine as of MySQL 3.23 with great performance| NO| NO | NO|
+------------+---------+------------------------------------------------------------+--------------+------+------------+
5 rows in set (0.00 sec)
2. 安装federated存储引擎
由于编译时没有选择federated,所以打算通过INSTALL PLUGIN的方式安装,正常情况下,federated是支持动态安装的:
=== Federated Storage Engine ===
Plugin Name:federated
Description:Connects to tables on remote MySQL servers
Supports build: static and dynamic
Configurations: max, max-no-ndb
可是执行以下命令时报错:
SQL>install plugin federated soname 'ha_federated.so';
ERROR 1126 (HY000): Can't open shared library '/usr/local/mysql/lib/mysql/plugin/ha_federated.so' (errno: 2 undefined symbol: dynstr_append_mem)
搜了一下,发现是个老问题,竟然到现在都没解决,可见MySQL团队的效率和管理的混乱。?id=40942
没有办法了,只有重新编译MySQL源码了, 加上--with-plugins=federated。从5.1.26开始,默认MySQL不启用federated存储引擎,所以需要在my.cnf中加入federated选项或是在命令行用--federated选项启动mysqld。编译后的结果如下:
SQL>show engines;
复制代码 代码如下:
+------------+---------+----------------------------------------------------------------------------+--------------+------+------------+
| Engine| Support | Comment| Transactions | XA | Savepoints |
+------------+---------+----------------------------------------------------------------------------+--------------+------+------------+
| CSV| YES| CSV storage engine| NO| NO | NO|
| MRG_MYISAM | YES| Collection of identical MyISAM tables| NO| NO | NO|
| FEDERATED | YES| Federated MySQL storage engine| NO| NO | NO|
| MyISAM| YES| Default engine as of MySQL 3.23 with great performance| NO| NO | NO|
| InnoDB| DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, and foreign keys | YES| YES | YES|
| MEMORY| YES| Hash based, stored in memory, useful for temporary tables| NO| NO | NO|
+------------+---------+----------------------------------------------------------------------------+--------------+------+------------+
6 rows in set (0.00 sec)
新闻热点
疑难解答