2009-02-04

 

Memcached Functions for MySQL (UDF's)

Tangent recently updated their libmemcached_functions_mysql UDF (now version 0.8), and it's looking good. I had some issues getting it to work on 64 bit Linux, so here are some notes (Centos/RHEL 64Bit).

Before you begin you will need all the usual development RPM's including "rpm-build", "mysql-devel", "gcc-c++", "libevent-devel" and "libevent".

Next obtain the various sources:

http://danga.com/memcached/dist/memcached-1.2.6.tar.gz
http://download.tangent.org/libmemcached-0.26-1.src.rpm
http://download.tangent.org/memcached_functions_mysql-0.8.tar.gz

This is also the order in which we build and install the software.

First, get "memcached" build and installed:

$ tar xzf memcached-1.2.6.tar.gz
$ cd memcached-1.2.6
$ ./configure --enable-64bit --enable-threads
$ make
# make install

Next we get the source RPM for "libmemcached" installed:

# rpm -Uvh libmemcached-0.26-1.src.rpm
# cd /usr/src/redhat/SPECS
# rpmbuild -bb libmemcached.spec
# rpm -Uvh /usr/src/redhat/RPMS/x86_64/libmemcached-0.26-1.x86_64.rpm

Finally we build and install "memcached_functions_mysql":

$ cd memcached_functions_mysql-0.8
$ ./configure --with-mysql=/usr/bin/mysql_config --libdir=/usr/lib64/mysql/
$ make
# make install

Finally you are ready to use Memcached from MySQL - all that's left is to install the functions you need (see "utils/install.pl").

Have fun

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?