Get the App
SLTechnology News&Howtos  ›  Database  › 

How to install the innodb plug-in in mysql

Shulou Source: shulou.com Published: 2022-05-31 19:25:04 10月14日 Update

Today, I will talk to you about how to install the innodb plug-in in mysql, many people may not know much about it. In order to make you understand better, the editor has summarized the following content for you. I hope you can get something according to this article.

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) to configure. If you want to add multiple plug-ins, separate them with half-width commas.

Method 2:

If mysql has been compiled and you don't want to recompile, you can install the plug-in. Innodb is a plug-in, and you can add it after installing mysql.

1. Check whether the mysql configuration supports dynamically adding plug-ins.

Mysql > show variables like "have_%"

+-+ +

| | Variable_name | Value |

+-+ +

| | have_compress | YES |

| | have_crypt | YES |

| | have_csv | YES |

| | have_dynamic_loading | YES | / / indicates that it is supported by YES. |

If it's no, it's not easy, 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 it's usually YES.

2, add plug-ins

Mysql > INSTALL PLUGIN INNODB SONAME 'ha_innodb.so'; / / prompt cannot open the file, no 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)

There is no permission error reported above, which makes me very depressed. The solution is as follows:

# find. -type d-print | grep-I plugin / / check whether the plug-in directory is correct

. / lib/mysql/plugin

# 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"

I also reported an error with chcon. I checked because I didn't install selinux.

# whereis selinux

Selinux:

I didn't install selinux at all. If I use it for personal use, I don't need this. I can't install it. After installation, chcon will not report an error.

Install the following

> 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 check

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)

After reading the above, do you have any further understanding of how to install the innodb plug-in in mysql? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Tags: Plug-ins content support methods files methods permissions installed compiled wrong depressed personal dynamic half-corner variables multiple that is case time more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Redmi MariaDB vpn Huawei