Determine if InnoDB plugin is installed in MySQL

How do we install the Innodb plugin, installed or not in MySQL? Is there any variable for checking Innodb Plugin set or not?

+6
source share
4 answers

If you need to determine if InnoDB is enabled when querying the database, you should use the INFORMATION_SCHEMA tables.

SELECT SUPPORT FROM INFORMATION_SCHEMA.ENGINES WHERE ENGINE = 'InnoDB'; 

What if InnoDB is enabled and is the default database gives the result

 +---------+ | SUPPORT | +---------+ | DEFAULT | +---------+ 

If InnoDB is available but not the default engine, the result will be YES . If it is not available, the result will obviously be NO .

See http://dev.mysql.com/doc/refman/5.5/en/engines-table.html and http://dev.mysql.com/doc/refman/5.5/en/information-schema.html for Help.

When InnoDB is available, the INFORMATION_SCHEMA tables mentioned in the comment are also available.

 SHOW TABLES FROM INFORMATION_SCHEMA LIKE 'INNODB%'; +----------------------------------------+ | Tables_in_INFORMATION_SCHEMA (INNODB%) | +----------------------------------------+ | INNODB_CMP_RESET | | INNODB_TRX | | INNODB_CMPMEM_RESET | | INNODB_LOCK_WAITS | | INNODB_CMPMEM | | INNODB_CMP | | INNODB_LOCKS | +----------------------------------------+ 
+9
source

A type:

SHOW ENGINES

at the mysql command prompt.

Innodb will look like this:

 Engine: InnoDB Support: YES Comment: Supports transactions, row-level locking, and foreign keys 
+7
source

" show plugins " is available, but my server uses the built-in InnoDB engine, and it is still unclear whether it is a built-in or a plug-in version.

It seems the best way to check is to look at my.cnf file. According to the installation docs for the plugin, you should specifically ignore the built-in version and enable the plugin:

 [mysqld] ignore-builtin-innodb plugin-load=innodb=ha_innodb_plugin.so ;innodb_trx=ha_innodb_plugin.so ;innodb_locks=ha_innodb_plugin.so ;innodb_lock_waits=ha_innodb_plugin.so ;innodb_cmp=ha_innodb_plugin.so ;innodb_cmp_reset=ha_innodb_plugin.so ;innodb_cmpmem=ha_innodb_plugin.so ;innodb_cmpmem_reset=ha_innodb_plugin.so 

(The value of the plugin-load parameter, as shown here, is formatted in several lines for display purposes, but should be written in my.cnf using one line with no spaces in the parameter value. On Windows, replace the .dll for each instance of the .so extension.)

See http://dev.mysql.com/doc/refman/5.1/en/replacing-builtin-innodb.html

The plugin replaces the built-in InnoDB with v5.5: http://dev.mysql.com/doc/refman/5.5/en/innodb-installation.html

0
source

Source: https://habr.com/ru/post/915286/


All Articles