Clean up redis cache under linux

    • Enter the command to connect to the redis server

redis-cli -h 127.0.0.1 -p 6379

#不用切换到redis的bin下面, 是因为安装redis 时已经配置了系统变量
    • Verify login password, auth + your redis password

    • Start cleaning the cache, the cleaning command is as follows

指定redis片区:
select 8

查看redis中的所有key值:
keys *

删除指定索引的值:
del key

清空整个 Redis 服务器的数据:
flushall 

清空当前库中的所有 key:
flushdb

Guess you like

Origin blog.csdn.net/weixin_55944621/article/details/128860935