How to install InnoDB plugin MySQL

Source: Internet
Author: User

I. background description:

1. Windows XP environment;

2. the MySQL server version has been installed. You can view it in the following way:

3. The default storage engine is InnoDB and the built-in non-InnoDB plugin;

Requirement: to take advantage of more features of the new storage engine InnoDB plugin, we decided to use the InnoDB plugin engine.

2. Procedure

1. You can run the show engines or show plugins command to view the currently installed engine or plug-in.

2. Check whether the current MySQL installation supports dynamic addition of plug-ins.

Note: If the value of the have_dynamic_loading option is yes, It is supported. If it is no, it must be troublesome, because have_dynamic_loading is a read-only variable.

3. Add a plug-in

First, check the directory where the plug-in DLL or so is located, and install it in Windows. The dll Directory is $ {mysqlhome}/lib/plugin/ha_innodb_plugin.dll.

Run the following command:

Mysql> install plugin InnoDB dllname 'Ha _ innodb_plugin.dll ';
Mysql> install plugin innodb_trx soname 'Ha _ innodb_plugin.dll ';
Mysql> install plugin innodb_locks soname 'Ha _ innodb_plugin.dll ';
Mysql> install plugin innodb_lock_waits soname 'Ha _ innodb_plugin.dll ';
Mysql> install plugin innodb_cmp soname 'Ha _ innodb_plugin.dll ';
Mysql> install plugin innodb_cmp_reset soname 'Ha _ innodb_plugin.dll ';
Mysql> install plugin innodb_cmpmem soname 'Ha _ innodb_plugin.dll ';
Mysql> install plugin innodb_cmpmem_reset soname 'Ha _ innodb_plugin.dll ';

4. Check whether the plug-in is successfully installed. Run the show plugins command or show engines command;

5. view the installed InnoDB plugin version:

Note:

It seems simple, but it is possible to dynamically load InnoDB Plugin:

1. If the source code is used for compilation, Innobase is not compiled by default. If the Binary Package is used for installation, add skip-InnoDB or ignore_builtin_innodb to my. CNF before startup.

2. You cannot use the-with-mysqld-ldflags =-all-static option to compile the library statically. When show global variables like 'have _ % '; the output is

Have_dynamic_loading will be no, which determines whether MySQL supports dynamic plugin loading. MySQL installed in the binary package is dynamically compiled and supports dynamic plugin loading. This is yes.

3. Select the corresponding InnoDB plugin version and put it under basedir/lib/plugin.

3. modify the configuration my. ini and restart MySQL.

1. Remove all the previous InnoDB configurations, perform the following configuration in my. ini, and then restart MySQL.

For Versions later than mysql5.1.38, to use the new InnoDB plugin storage engine, you only need to configure the following in my. ini:

# *** InnoDB specific options ***
Ignore-builtin-InnoDB

Plugin-load = InnoDB = ha_innodb_plugin.dll
Plugin-load = innodb_trx = ha_innodb_plugin.dll
Plugin-load = innodb_locks = ha_innodb_plugin.dll
Plugin-load = innodb_lock_waits = ha_innodb_plugin.dll
Plugin-load = innodb_cmp = ha_innodb_plugin.dll
Plugin-load = innodb_cmp_reset = ha_innodb_plugin.dll
Plugin-load = innodb_cmpmem = ha_innodb_plugin.dll
Plugin-load = innodb_cmpmem_reset = ha_innodb_plugin.dll

Note: After adding Loose _ to the previous configuration item, the configuration item is changed to the InnoDB plugin configuration item, as shown in figure

Loose_innodb_additional_mem_pool_size = 12 m
Loose_innodb_flush_log_at_trx_commit = 1
Loose_innodb_log_buffer_size = 6 m
Loose_innodb_buffer_pool_size = 538 m
Loose_innodb_log_file_size = 269 m
Loose_innodb_thread_concurrency = 10
Loose_innodb_file_per_table = 1

2. Restart MySQL.

If the following error occurs during restart:

120701 13:47:11 [Error] plugin 'innodb' init function returned error.
120701 13:47:11 [Error] plugin 'innodb' registry as a storage engine failed.
120701 13:48:51 [note] mysqld: normal Shutdown

120701 13:48:51 [note] event schedents: purging the queue. 0 events
120701 13:48:53 [Warning] mysqld: forcing close of thread 1 user: 'root'

InnoDB: Error: Log File. \ ib_logfile0 is of different size 0 282066944 bytes
InnoDB: than specified in the. CNF file 0 5242880 bytes!
120701 13:48:53 [note] mysqld: shutdown complete

Solution: you only need to delete the ib_logfile0 and ib_logfile1 files in the MySQL directory and restart MySQL to solve the problem.

 

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.