You can use show engines, or show plugins;
Mysql> Show plugins;
+------------+--------+----------------+---------+---------+
| Name | Status | Type | Library | License |
+------------+--------+----------------+---------+---------+
| Binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| Mrg_myisam | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
+------------+--------+----------------+---------+---------+
5 rows in Set (0.00 sec)
Method One:
When configure, add –with-plugins=innobase (or all) if you want to add multiple plugins, separated by a comma with a half-width
Method Two:
If MySQL has been compiled, and do not want to recompile, you can install plug-ins, InnoDB is a plug-in, installed after MySQL can also be added.
1, check that MySQL configuration is not supported dynamically add plugins
Mysql> Show variables like "have_%";
+----------------------+-------+
| variable_name | Value |
+----------------------+-------+
| have_compress | YES |
| Have_crypt | YES |
| Have_csv | YES |
| have_dynamic_loading | YES | Here is the Yes expression is supported
If it is no, it is not very good, because have_dynamic_loading is a read-only variable,
Mysql> set have_dynamic_loading=1;
ERROR 1238 (HY000): Variable ' have_dynamic_loading ' is a read only Variable
But normally it's yes,
2, add plugin
mysql> INSTALL PLUGIN INNODB SONAME ' ha_innodb.so '; Prompt cannot open file, no permission
ERROR 1126 (HY000): Can ' t open shared library '/usr/local/mysql/lib/mysql/plugin/ha_innodb.so ' (errno:13 cannot restore s Egment prot after Reloc:permission denied)
The above reported no permissions error, make me very depressed, the solution is as follows:
# Find. -type d-print |grep-i plugin//Check the plugin directory right
./lib/mysql/plugin
# chcon-t Texrel_shlib_t/usr/local/mysql/lib/mysql/plugin/ha_innodb.so
Chcon: Partial association cannot be applied to file "/usr/local/mysql/lib/mysql/plugin/ha_innodb.so"
With Chcon also error, I check it is because I did not install SELinux
# Whereis SELinux
SELinux
SELinux I did not install, if the personal use, this also do not need, no way to install, after loading Chcon will not error.
Install the following several
> Install plugin INNODB soname "ha_innodb.so";
mysql> Install plugin Innodb_trx soname "ha_innodb.so";
mysql> Install plugin innodb_locks soname "ha_innodb.so";
mysql> Install plugin innodb_lock_waits soname "ha_innodb.so";
mysql> Install plugin innodb_cmp soname "ha_innodb.so";
mysql> Install plugin innodb_cmp_reset soname "ha_innodb.so";
mysql> Install plugin innodb_cmpmem soname "ha_innodb.so";
mysql> Install plugin innodb_cmpmem_reset soname "ha_innodb.so"
After installation, use show engines; or show plugins; to see
Mysql> Show plugins;
+---------------------+--------+--------------------+---------+---------+
| Name | Status | Type | Library | License |
+---------------------+--------+--------------------+---------+---------+
| Binlog | ACTIVE | STORAGE ENGINE | NULL | GPL |
| CSV | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL |
| InnoDB | ACTIVE | STORAGE ENGINE | 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 |
| Mrg_myisam | ACTIVE | STORAGE ENGINE | NULL | GPL |
| MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL |
+---------------------+--------+--------------------+---------+---------+
Rows in Set (0.00 sec)
Author "Huoxiujian"
MySQL installation InnoDB plugin