You can use show engines; or show plugins; To View
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 1:
Add-with-plugins = innobase (or all) in configure. If you want to add multiple plug-ins, separate them with commas.
Method 2:
If mysql has been compiled and you do not want to re-compile it, you can install the plug-in. innodb is a plug-in that can be added after mysql is installed.
1. Check whether mysql configuration supports dynamic addition of plug-ins.
Mysql> show variables like "have _ % ";
+ ---------------------- + ------- +
| Variable_name | Value |
+ ---------------------- + ------- +
| Have_compress | YES |
| Have_crypt | YES |
| Have_csv | YES |
| Have_dynamic_loading | YES | // YES indicates that YES is supported.
If it is no, it is not easy to do, 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 in general, YES,
2. Add a plug-in
Mysql> install plugin innodb soname 'Ha _ innodb. so'; // The system prompts that the file cannot be opened and you do not have the permission.
ERROR 1126 (HY000): Can't open shared library '/usr/local/mysql/lib/mysql/plugin/ha_innodb.so' (errno: 13 cannot restore segment prot after reloc: permission denied)
I am very depressed because I have not reported a permission error. The solution is as follows:
Root @ ubuntu:/usr/local/mysql # find.-type d-print | grep-I plugin // check whether the plug-in directory is correct.
./Lib/mysql/plugin
Root @ ubuntu:/usr/local/mysql # chcon-t texrel_shlib_t/usr/local/mysql/lib/mysql/plugin/ha_innodb.so
Chcon: Some associations cannot be applied to the file "/usr/local/mysql/lib/mysql/plugin/ha_innodb.so"
An error is reported when chcon is used. I checked it because selinux is not installed.
Root @ ubuntu:/usr/local/mysql # whereis selinux
Selinux:
Selinux is not installed at all. If this is not required for personal use, it cannot be installed. After installation, chcon will not report an error.
Install the following
Mysql> 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 the installation is complete, use show engines; or show plugins; To View
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 |
+ --------------------- + -------- + -------------------- + --------- +
13 rows in set (0.00 sec)
Author: "huoxiujian"