mysql 5.1支持触发器以及自定义函数接口(UDF)的特性,如果配合libmemcache以及Memcached Functions for MySQL,就能够实现memcache的自动更 新。简单记录一下安装测试步骤。
安装需求:
需要安装memcached、libmemcached
1、下载memcached_functions_mysql-1.1.tar.gz
https://launchpad.net/memcached-udfs/+download
2、解压并安装memcached_functions_mysql-1.1.tar.gz
tar -xzvf memcached_functions_mysql-1.1.tar.gz
cd memcached_functions_mysql-1.1
./configure --with-libmemcached=/usr/local/
make && make install
注意
在编译的时候报错:
servers.c: In function 'memc_servers_set':
servers.c:122: error: 'memcached_st' has no member named 'hosts'
servers.c:123: error: 'memcached_st' has no member named 'hosts'
servers.c:124: error: 'memcached_st' has no member named 'hosts'
经过测试:安装了libmemcached-0.39、libmemcached-0.38都有这样的错误,libmemcached-0.37没有这种错误,你需要安装libmemcached-0.37
转载于:https://blog.51cto.com/hijoys/325425