How to empty a redis database?

0 votes
I've been playing with redis (and add some fun with it) during the last fews days and I'd like to know if there is a way to empty the db easily.
During my tests, I created several sets with a lot of members, even created sets that I do not remember the name (how can I list those guys though ?
Any idea about how to get rid of all of them ?
May 4 in Database by kartik
• 11,890 points
21 views

1 answer to this question.

0 votes

Hello @kartik,

You have two options:

  • FLUSHDB - clears currently active database
  • FLUSHALL - clears all the existing databases

Be careful here.

FlushDB deletes all keys in the current database while FlushALL deletes all keys in all databases on the current host.

Thank You!!

answered May 4 by Niroj
• 23,950 points

Related Questions In Database

0 votes
2 answers
0 votes
2 answers

How to select the nth row in a SQL database table?

SELECT * FROM ( SELECT ID, NAME, ROW_NUMBER() ...READ MORE

answered Apr 23 in Database by anand
• 140 points
1,504 views
0 votes
1 answer

How to do a batch insert in MySQL

You can try out the following query: INSERT ...READ MORE

answered Sep 10, 2018 in Database by Sahiti
• 6,290 points
844 views
0 votes
1 answer

How to connect to MySQL Database?

using MySql.Data; using MySql.Data.MySqlClient; namespace Data { ...READ MORE

answered Oct 12, 2018 in Database by Frankie
• 9,810 points
216 views
0 votes
1 answer

Error:Import SQL dump into PostgreSQL database

Hello, Here is the command you are looking ...READ MORE

answered May 4 in Database by Niroj
• 23,950 points
29 views
0 votes
1 answer
0 votes
1 answer

MySQL Error: : 'Access denied for user 'root'@'localhost'

Hello @kartik, I did this to set my ...READ MORE

answered May 4 in Database by Niroj
• 23,950 points
134 views
0 votes
1 answer

Error Code: 2020. Lost connection to MySQL server during query

Hello @kartik, I got the same issue when ...READ MORE

answered May 4 in Database by Niroj
• 23,950 points
67 views
+1 vote
1 answer

How to migrate a PostgreSQL database into a SQLServer one?

Hello @kartik, The easier way to accomplish this. First ...READ MORE

answered May 13 in Database by Niroj
• 23,950 points
41 views
0 votes
1 answer

Sir please tell me how to import image in database?

Hello soumadip, (Assuming you are using mysql database) You ...READ MORE

answered Apr 1 in Database by Niroj
• 23,950 points
68 views