Mar 23, 2010 0
Installing MySQL with the InnoDB Plugin
I found after installing MySQL 5.1 that the “fast index creation” feature is not utilized by the default InnoDB storage engine that comes with MySQL 5.1. This is the main reason why I went through the trouble of installing MySQL 5.1 in the first place. :-/ However, have no fear, the InnoDB plugin is here! (ok, that was lame, anyways…)
The InnoDB plugin is a replacement InnoDB storage engine developed with the help of Sun, Google and Percona. It supposedly provides better overall performance compared with the default InnoDB storage engine that comes with MySQL and it adds a few new features that I want such as “fast index creation.”
If you’d like to try out the InnoDB plugin you’ll have to recompile MySQL as a pre-compiled binary drop-in is not provided yet for OSX. So, here are the steps for compiling and installing MySQL 5.1 with the InnoDB plugin while maintaining a working MySQL 5.0 installation on your computer.
- Download the MySQL 5.1 source distribution (v.5.1.43 for me; Change Platform to: Source Code; Scroll down to the last distribution: Generic Linux (Architecture Independent))
- Download the InnoDB plugin source distribution (v.1.0.6 for me)
- Create a new install directory for MySQL 5.1:
sudo mkdir /usr/local/mysql-5.1.43 - Change ownership of the install directory to the mysql user:
sudo chown -R mysql /usr/local/mysql-5.1.43 - Extract the MySQL source:
tar -zxf mysql-5.1.43.tar.gz - Extract the InnoDB plugin source:
tar -zxf innodb-1.0.6.tar.gz - Change into the MySQL source directory for storage engines:
cd mysql-5.1.37/storage - Remove the version of the InnoDB plugin that MySQL comes with:
rm -fr innobase - Replace the InnoDB plugin with the one you downloaded:
mv innodb-1.0.6 innobase - Change into the MySQL source root:
cd .. - Create the make file:
./configure --prefix=/usr/local/mysql-5.1.43 --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-shared --with-plugins=innobase --without-plugin-innodb_plugin --with-federated-storage-engine; note, I’m also including the Federated Storage Engine here in case you find a use for it in the future; NOTE: You will receive the following warning, however, IT DID WORK, so just ignore it:configure: WARNING: unrecognized options: --without-plugin-innodb_plugin, --with-federated-storage-engine - Compile MySQL:
make; takes about 10 minutes or so - Install MySQL:
sudo make install - Change into your install directory:
cd /usr/local/mysql-5.1.43 - Create the MySQL database:
sudo ./bin/mysql_install_db --user=mysql - Change ownership of the
vardirectory to the mysql user:sudo chown -R mysql ./var
For more information see…
If you get stuck you can check out the following resources that I used to complete this process:
