How to List All Redis Databases?

前端 未结 3 1502
北恋
北恋 2020-12-12 08:59

I ran this command to access my redis server.

telnet 127.0.0.1 6379

What is the command to show all of my databases?

3条回答
  •  失恋的感觉
    2020-12-12 09:50

    you can use redis-cli INFO keyspace

    localhost:8000> INFO keyspace
    # Keyspace
    db0:keys=7,expires=0,avg_ttl=0
    db1:keys=1,expires=0,avg_ttl=0
    db2:keys=1,expires=0,avg_ttl=0
    db11:keys=1,expires=0,avg_ttl=0
    

提交回复
热议问题