I want to delete all keys. I want everything wiped out and give me a blank database.
Is there a way to do this in Redis client?
I want to delete all keys. I want everything wiped out and give me a blank database.
Is there a way to do this in Redis client?
Its better if you can have RDM (Redis Desktop Manager). You can connect to your redis server by creating a new connection in RDM.
Once its connected you can check the live data, also you can play around with any redis command.
Opening a cli in RDM.
1) Right click on the connection you will see a console option, just click on it a new console window will open at the bottom of RDM.
Coming back to your question FLUSHALL is the command, you can simply type FLUSHALL in the redis cli.
Moreover if you want to know about any redis command and its proper usage, go to link below. https://redis.io/commands.
One click in FastoRedis/FastoNoSQL
This method worked for me - delete everything of current connected Database on your Jedis cluster.
FLUSHALL Remove all keys from all databases
FLUSHDB Remove all keys from the current database
SCRIPT FLUSH Remove all the scripts from the script cache.
After you start the Redis-server using:
service redis-server start --port 8000
orredis-server
.Use
redis-cli -p 8000
to connect to the server as a client in a different terminal.You can use either
Check the documentation for ASYNC option for both.
If you are using Redis through its python interface, use these two functions for the same functionality:
and
Your questions seems to be about deleting entire keys in a database. In this case you should try:
redis-cli
(if running on port 6379), else you will have to specify the port number also.select {Index}
)flushdb
If you want to flush keys in all databases, then you should try
flushall
.