redis清理缓存_www.suchazz.com

redis清理缓存

2022-08-04 22:33:24  浏览:242  作者:信息发布员

清理redis缓存

1、进入redis根目录或bin目录

2、登录redis

./redis-cli -h 127.0.0.1 -p 6379 -a test(密码)

3、清空当前redis数据库缓存FLUSHDB

flushdb

4、清空整个redis缓存FLUSHALL

flushall

========示例============

[root@testserver /]# cd /redis/bin/

[root@testserver bin]# ls

redis-benchmark  redis-check-aof  redis-check-rdb  redis-cli  redis-sentinel  redis-server

[root@testserver bin]# ./redis-cli -h 127.0.0.1 -p 6379 -a redis@2018@htjs

Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.

127.0.0.1:6379> flushdb

OK

127.0.0.1:6379> flushall

5202:M 03 Aug 2022 16:49:47.375 * DB saved on disk

OK


评论区

共 0 条评论
  • 这篇文章还没有收到评论,赶紧来抢沙发吧~

【随机内容】

返回顶部