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, 2020 in Database by kartik
• 37,520 points
986 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, 2020 by Niroj
• 82,840 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, 2020 in Database by anand
• 140 points
26,412 views
0 votes
1 answer

How to drop all tables from a database with one SQL query?

Use the INFORMATION_SCHEMA.TABLES view to get the ...READ MORE

answered Feb 4, 2022 in Database by Neha
• 9,020 points
9,009 views
0 votes
1 answer

How to rename a column in a database table using SQL?

For SQL Server, use sp_rename USE AdventureWorks; GO EXEC sp_rename 'Customers.CustomerTerritory.TerritoryID', ...READ MORE

answered Feb 9, 2022 in Database by Neha
• 9,020 points
773 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, 2020 in Database by Niroj
• 82,840 points
5,302 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, 2020 in Database by Niroj
• 82,840 points
18,457 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, 2020 in Database by Niroj
• 82,840 points
2,715 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, 2020 in Database by Niroj
• 82,840 points
1,042 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, 2020 in Database by Niroj
• 82,840 points
1,020 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP