如何在 Debian MySQL 软件包中启用联合存储引擎?

如何在 Debian MySQL 软件包中启用联合存储引擎?

如何在Debian 软件包FEDERATED中启用额外的(在本例中)存储引擎?mysql-server-5.1

我是mysql-server-5.1通过apt-get安装的。但SHOW ENGINES显示联盟未启用。

mysql> show engines;
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine     | Support | Comment                                                        | Transactions | XA   | Savepoints |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
| InnoDB     | YES     | Supports transactions, row-level locking, and foreign keys     | YES          | YES  | YES        |
| MRG_MYISAM | YES     | Collection of identical MyISAM tables                          | NO           | NO   | NO         |
| BLACKHOLE  | YES     | /dev/null storage engine (anything you write to it disappears) | NO           | NO   | NO         |
| CSV        | YES     | CSV storage engine                                             | NO           | NO   | NO         |
| MEMORY     | YES     | Hash based, stored in memory, useful for temporary tables      | NO           | NO   | NO         |
| FEDERATED  | NO      | Federated MySQL storage engine                                 | NULL         | NULL | NULL       |
| ARCHIVE    | YES     | Archive storage engine                                         | NO           | NO   | NO         |
| MyISAM     | DEFAULT | Default engine as of MySQL 3.23 with great performance         | NO           | NO   | NO         |
+------------+---------+----------------------------------------------------------------+--------------+------+------------+
8 rows in set (0.00 sec)

答案1

从 MySQL 5.1.26 开始,运行的服务器默认不启用 FEDERATED 存储引擎;要启用 FEDERATED,您必须使用该选项启动 MySQL 服务器二进制文件--federated

或者编辑/etc/my.cnf全局服务器配置文件并在[mysqld]节部分下添加以下行:

federated

必须重新启动 mysqld 服务才能启用联合引擎,并且默认情况下会为 mysql 服务的每个实例/重新启动启用联合引擎。

相关内容