YouTip LogoYouTip

Server Flushall

# Redis Flushall Command * (javascript:void(0);) * (javascript:void(0);) * (javascript:void(0);) * (javascript:void(0)) Redis Tutorial (#)(#)(#)(#)(#) ## Redis Commands (#)(#)(#)(#)(#)(#)(#)(#)[Redis Pub/Sub](#)(#)(#)(#)(#)(#)(#) ## Redis Advanced Tutorial [Redis Data Backup & Recovery](#)(#)(#)(#)(#)(#)(#)(#) [](#)(#) (#)[](#) # Redis Flushall Command !(#)(#) The Redis Flushall command is used to clear all data in the entire Redis server (delete all keys in all databases). ### Syntax The basic syntax for the Redis Flushall command is as follows: redis 127.0.0.1:6379> FLUSHALL ### Available Since >= 1.0.0 ### Return Value Always returns OK. ### Example redis 127.0.0.1:6379> DBSIZE # Number of keys in database 0 (integer) 9 redis 127.0.0.1:6379> SELECT 1 # Switch to database 1 OK redis 127.0.0.1:6379> DBSIZE # Number of keys in database 1 (integer) 6 redis 127.0.0.1:6379> flushall # Clear all keys in all databases OK redis 127.0.0.1:6379> DBSIZE # Not only is database 1 cleared (integer) 0 redis 127.0.0.1:6379> SELECT 0 # Database 0 (and all other databases) is also cleared OK redis 127.0.0.1:6379> DBSIZE (integer) 0 !(#)(#)
← C Function MbstowcsEclipse Shortcuts β†’