1. File Package Download
Http://pan.baidu.com/s/1qW9DHYc
2. Installation
- - - I/usr/local/mysql/---/usr /local/MySQL/lib/plugin/
3. Generating functions
DROP FUNCTION IF EXISTS' Redis_connect ';DROP FUNCTION IF EXISTS' Redis_close ';DROP FUNCTION IF EXISTS' redis_put ';DROP FUNCTION IF EXISTS' Redis_set ';DROP FUNCTION IF EXISTS' Redis_delete ';DROP FUNCTION IF EXISTS' Redis_incrby ';DROP FUNCTION IF EXISTS' REDIS_INCR ';DROP FUNCTION IF EXISTS' Redis_decrby ';DROP FUNCTION IF EXISTS' REDIS_DECR ';DROP FUNCTION IF EXISTS' REDIS_DECR ';DROP FUNCTION IF EXISTS' Redis_lpush ';DROP FUNCTION IF EXISTS' Redis_rpush ';DROP FUNCTION IF EXISTS' redis_pipe ';DROP FUNCTION IF EXISTS' Json_object ';Create functionJson_objectreturnsString soname'udf_redis.so';Create functionRedis_pipereturnsString soname'udf_redis.so';Create functionRedis_rpushreturnsString soname'udf_redis.so';Create functionRedis_lpushreturnsString soname'udf_redis.so';Create functionRedis_decrreturnsString soname'udf_redis.so';Create functionRedis_decrbyreturnsString soname'udf_redis.so';Create functionRedis_incrreturnsString soname'udf_redis.so';Create functionRedis_incrbyreturnsString soname'udf_redis.so';Create functionRedis_deletereturnsString soname'udf_redis.so';Create functionRedis_setreturnsString soname'udf_redis.so';Create functionRedis_closereturnsString soname'udf_redis.so';Create functionRedis_connectreturnsString soname'udf_redis.so';
4, use (simple small example)
Select redis_set ('myKey3','myValues3')
SelectRedis_pipe (CONCAT ('Set MyKey1',' ','myValues1','\ r \ n','Set MyKey2',' ','MyValues2','\ r \ n'))
Note: This execution will have to return, do not want to have a return as modified as follows
SET @str_res = (select Redis_set (' MyKey3 ', ' MyValues3 '))