MySQL 5.6啟動後,其日志文件存在如下錯誤:
...... 2015-10-28 13:27:05 25054 [ERROR] Function 'innodb' already exists 2015-10-28 13:27:05 25054 [Warning] Couldn't load plugin named 'innodb' with soname 'ha_innodb.so'. 2015-10-28 13:27:05 25054 [ERROR] Function 'federated' already exists 2015-10-28 13:27:05 25054 [Warning] Couldn't load plugin named 'federated' with soname 'ha_federated.so'. 2015-10-28 13:27:05 25054 [ERROR] Function 'blackhole' already exists 2015-10-28 13:27:05 25054 [Warning] Couldn't load plugin named 'blackhole' with soname 'ha_blackhole.so'. 2015-10-28 13:27:05 25054 [ERROR] Function 'archive' already exists 2015-10-28 13:27:05 25054 [Warning] Couldn't load plugin named 'archive' with soname 'ha_archive.so'. ......
分析原因,是MySQL 5.6沒有以下四個插件所致。
MySQL 5.6服務器初始化腳本添加了以下的插件表,而實際上MySQL 5.6不依賴於任何插件。
mysql> select * from mysql.plugin; +-----------+-----------------+ | name | dl | +-----------+-----------------+ | innodb | ha_innodb.so | | federated | ha_federated.so | | blackhole | ha_blackhole.so | | archive | ha_archive.so | +-----------+-----------------+ 4 rows in set (0.00 sec)
解決它很簡單,執行命令:
mysql> delete from mysql.plugin; Query OK, 4 rows affected (0.00 sec)
刪掉這4個插件,清除日志,重啟MySQL服務,可以看到,MySQL無錯運行。