How to install Memcached functions for MySQL

Download libmemcached 0.35 (any version greater than this won't work) and Memcached functions for MySQL (I've used version 1.1).

Extract libmemcached and execute the following inside the extracted directory:

./configure
make
sudo make install

Extract the Memcached functions archive and execute the following inside the extracted directory:

./configure
make
sudo make install

Execute the following query inside a MySQL client and copy the returned value:

SHOW VARIABLES LIKE 'plugin_dir';

Copy the compiled Memcached libraries to the MySQL plugins directory:

sudo cp /usr/local/lib/libmemcached_functions_mysql* <VALUE_FROM_ABOVE_QUERY>

Restart the MySQL server, then go to Memcached functions dir and then the "sql" directory. Log into a mysql client in that dir:

$ mysql -uroot
mysql> source ./install_functions.sql

You're done. Hopefully.