I attempt to put some frequently used data into redis server from mysql . so redis just as a read server , i need to move data from mysql to redis. can anybody recommend a good approache ? i have read some topics and have some thinking share
1、through mysql trigger to record proper data , through timing app move data to redis 2、read mysql logs ,analysis it ,then put it to redis.
BTW: in my application data stored in redis don't need real-time, a little latency is ok.
Use mass-insert mode of redis-cli.
Check this out - http://dcw.ca/blog/2013/01/02/mysql-to-redis-in-one-step/
I think the mysql udf plugin (https://github.com/Ideonella-sakaiensis/lib_mysqludf_redis) can help you to synchronize data from Mysql to Redis.
example:
set up a trigger for the table and call redis command by mysql udf
then you can get value by my_table id