Compile the Memcached-Libraries

MySQL provides NoSQL features since version MySQL 5.6 via the Memcached plugin. To use these advanced features for your instance you compiled from source, some modifications are required. Install libevent-dev to obtain the appropriate event libraries via apt.

apt-get install libevent-dev

Then, modify the cmake script and switch the option flag for the Memcached Plugin from OFF to ON. Open the File CMakeLists.txt and search for this line:

OPTION(WITH_INNODB_MEMCACHED "" OFF)

Change this line to:

OPTION(WITH_INNODB_MEMCACHED "" ON)

Then compile MySQL by using these commands:

rm CMakeCache.txt; make clean: cmake . ; make

Then copy the shared libraries into your plugin folder:

cp ./plugin/innodb_memcached/daemon_memcached/libmemcached.so /usr/local/mysql/lib/plugin/
 cp ./plugin/innodb_memcached/innodb_memcache/innodb_engine.so /usr/local/mysql/lib/plugin/

Then from the MySQL-Console, issue these two commands (without the mysql>):

mysql> SOURCE /usr/local/mysql/share/innodb_memcached_config.sql;
mysql> NSTALL PLUGIN daemon_memcached soname "libmemcached.so";