Redis: Useful commands

SELECT X      - Select database (the X must be int)
CONFIG GET databases - Get databases number

INFO keyspace - List Databases info
LUSHDB        - Removes data from your connection's CURRENT database.
FLUSHALL      - Removes data from ALL databases.

查看数据库位置:

echo "CONFIG GET *" | redis-cli | grep -e "dir" -e "dbfilename" -A1

更改数据库位置:

修改redis.conf文件的dir信息
posted @ 2015-06-05 16:14  GreatK  阅读(200)  评论(0编辑  收藏  举报