Follow me

Showing posts with label set default engine to INNODB. Show all posts
Showing posts with label set default engine to INNODB. Show all posts

Tuesday, November 22, 2011

INNODB PLUG-IN INSTALLATION & SET UP

INNODB PLUG-IN INSTALLATION & SET UP

Step 1)

If you already have the MYSQL installed but don’t have innodb plugin on machine please stop it and remove it by

a) Executing command #rpm -qa | grep -i mysql (will list all package)

Ex.

mysql-libs-5.0.45-6.fc8

mysql-server-5.0.45-6.fc8

mysql-5.0.45-6.fc8

perl-DBD-MySQL-4.005-2.fc8.1

b) Remove this by executing #rpm –e package_name

Ex. #rpm –e mysql-libs-5.0.45-6.fc8

c) If you got “specifies multiple packages error then use for those package” error then execute below command

rpm -aq | grep mysql | xargs rpm -e --nodeps –allmatches

d) Execute command #find / -name mysql this will show you all remaining

Installed folder. Remove this using command #rm -fr mysql

Step 2)

a) Download the below packages from

wget http://downloads.skysql.com/archives/mysql-5.1/MySQL-client- community-5.1.54-1.rhel5.x86_64.rpm

wget http://downloads.skysql.com/archives/mysql-5.1/MySQL-shared- compat-5.1.54-1.rhel5.x86_64.rpm

wget http://downloads.skysql.com/archives/mysql-5.1/MySQL-server- community-5.1.54-1.rhel5.x86_64.rpm

wget http://downloads.skysql.com/archives/mysql-5.1/MySQL-community- debuginfo-5.1.54-1.rhel5.x86_64.rpm

wget http://downloads.skysql.com/archives/mysql-5.1/MySQL-devel- community-5.1.54-1.rhel5.x86_64.rpm

b) Install it using

rpm -ivh MySQL-client-community-5.1.54-1.rhel5.x86_64.rpm

rpm -ivh MySQL-devel-community-5.1.54-1.rhel5.x86_64.rpm

rpm -ivh MySQL-shared-compat-5.1.54-1.rhel5.x86_64.rpm

rpm -ivh MySQL-community-debuginfo-5.1.54-1.rhel5.x86_64.rpm

rpm -ivh MySQL-server-community-5.1.54-1.rhel5.x86_64.rpm

c) Open file /etc/my.cnf. If it exists with some other name like

/etc/my.cnf.rpmsave then rename it with my.cnf

Ex. #mv /etc/my.cnf.rpmsave /etc/my.cnf

d) Add the below settings into my.cnf

ignore_builtin_innodb

default-storage-engine=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_plug in.so;innodb_cmp=ha_innodb_plugin.so;innodb_cmp_reset=ha_innodb_p lugin.so;innodb_cmpmem=ha_innodb_plugin.so;innodb_cmpmem_reset=ha _innodb_plugin.s

e) Restart the server # /etc/init.d/mysql restart

f) Change password /usr/bin/mysqladmin -u root password '****'

Step 3) execute below commands

INSTALL PLUGIN INNODB_TRX SONAME 'ha_innodb_plugin.so';

INSTALL PLUGIN INNODB_LOCKS SONAME 'ha_innodb_plugin.so';

INSTALL PLUGIN INNODB_LOCK_WAITS SONAME 'ha_innodb_plugin.so';

INSTALL PLUGIN INNODB_CMP SONAME 'ha_innodb_plugin.so';

INSTALL PLUGIN INNODB_CMP_RESET SONAME 'ha_innodb_plugin.so';

INSTALL PLUGIN INNODB_CMPMEM SONAME 'ha_innodb_plugin.so';

INSTALL PLUGIN INNODB_CMPMEM_RESET SONAME 'ha_innodb_plugin.so';

Step 4) Test the plug-in install or not by

a) execute mysql> show plugins \G. This will display all the install plugins

How to set default engine to INNODB

Step 1) this can be done by

a) Setting default-storage-engine=InnoDB in my.cnf under under [mysqld]

Or

b) Executing SET storage_engine=InnoDB;

c) To test it, execute the command mysql> show engines \G

This will display below output for InnoDB.

Engine: InnoDB

Support: DEFAULT

Comment: Supports transactions, row-level locking, and foreign keys

Transactions: YES

XA: YES

Savepoints: YES

How to Un-install the INNODB plug-in

Step 1) execute the below Mysql commands

SET GLOBAL innodb_fast_shutdown=0;

UNINSTALL PLUGIN INNODB;

UNINSTALL PLUGIN INNODB_CMP;

UNINSTALL PLUGIN INNODB_CMP_RESET;

UNINSTALL PLUGIN INNODB_CMPMEM;

UNINSTALL PLUGIN INNODB_CMPMEM_RESET;

UNINSTALL PLUGIN INNODB_TRX;

UNINSTALL PLUGIN INNODB_LOCKS;

UNINSTALL PLUGIN INNODB_LOCK_WAITS;

And remove the entry default-storage-engine=InnoDB from my.cnf