Redis snippets

Restarting Redis

To restart redis, you need to AUTH from redis-cli and run:

shutdown

then exit, run

service redis start

To find the password for your current redis installation, open the following file:

vim /etc/redis/6379.conf

search for the line required pass

Run Redis commands from command line without logging to redid-cli

To run a redis command from command line:

Show all keys:

/usr/bin/redis-cli keys '*'

Remove all keys:

/usr/bin/redis-cli FLUSHDB

Further info:

  • http://stackoverflow.com/questions/7537905/redis-set-a-password-for-redis
  • http://stackoverflow.com/questions/6910378/how-can-i-stop-redis-server
Total Views: 24 ,