
1、先確保redis進(jìn)程存活
ps -ef|grep redis

2、執(zhí)行./redis-cli或者./redis-cli -h 127.0.0.1 -p 6379
[root@slave bin]# ./redis-cli

3、執(zhí)行:dbsize命令

4、執(zhí)行:flushall命令

5、使用keys * 進(jìn)行驗(yàn)證是否為空

6、執(zhí)行:exit

更多Redis相關(guān)知識(shí),請(qǐng)?jiān)L問(wèn)Redis使用教程欄目!