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信息