Amazonが用意しているyumリポジトリのMySQL5.1はデフォルトでBlackholeストレージエンジンが有効になっていない。
以下、有効にする方法。
mysql> show plugins;
+------------+--------+----------------+---------+---------+
| Name | Status | Type | Library | License |
+------------+--------+----------------+---------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
+------------+--------+----------------+---------+---------+
7 rows in set (0.04 sec)
mysql>
/usr/lib64/mysql/plugins/にha_blackhole.soがあることを確認する。
インストール
てな感じ。
以下、有効にする方法。
mysql> show plugins;
+------------+--------+----------------+---------+---------+
| Name | Status | Type | Library | License |
+------------+--------+----------------+---------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
+------------+--------+----------------+---------+---------+
7 rows in set (0.04 sec)
mysql>
/usr/lib64/mysql/plugins/にha_blackhole.soがあることを確認する。
[ec2-user@testdb1 plugin]$ pwd
/usr/lib64/mysql/plugin
[ec2-user@testdb1 plugin]$ ls
file.so ha_archive.so.0.0.0 ha_blackhole.so.0.0.0 ha_example.so.0.0.0 ha_federated.so.0.0.0
ha_archive.so ha_blackhole.so ha_example.so ha_federated.so
ha_archive.so.0 ha_blackhole.so.0 ha_example.so.0 ha_federated.so.0
[ec2-user@testdb1 plugin]$
/usr/lib64/mysql/plugin
[ec2-user@testdb1 plugin]$ ls
file.so ha_archive.so.0.0.0 ha_blackhole.so.0.0.0 ha_example.so.0.0.0 ha_federated.so.0.0.0
ha_archive.so ha_blackhole.so ha_example.so ha_federated.so
ha_archive.so.0 ha_blackhole.so.0 ha_example.so.0 ha_federated.so.0
[ec2-user@testdb1 plugin]$
インストール
mysql> INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so';
Query OK, 0 rows affected (0.03 sec)
mysql> show plugins;
+------------+--------+----------------+-----------------+---------+
| Name | Status | Type | Library | License |
+------------+--------+----------------+-----------------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| BLACKHOLE | ACTIVE | STORAGE ENGINE | ha_blackhole.so | GPL |
+------------+--------+----------------+-----------------+---------+
8 rows in set (0.00 sec)
mysql>
Query OK, 0 rows affected (0.03 sec)
mysql> show plugins;
+------------+--------+----------------+-----------------+---------+
| Name | Status | Type | Library | License |
+------------+--------+----------------+-----------------+---------+
| binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| partition | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MRG_MYISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
| BLACKHOLE | ACTIVE | STORAGE ENGINE | ha_blackhole.so | GPL |
+------------+--------+----------------+-----------------+---------+
8 rows in set (0.00 sec)
mysql>
てな感じ。