Redis命令
https://blog.csdn.net/m0_64830623/article/details/123145942
启动主master:redis-server /Users/macos/IDEA_Project/redis/redis-6.0.16/redis.conf
启动slave:redis-server /Users/macos/IDEA_Project/redis/redis-6.0.16/slave.conf
查看主从关系:redis-cli -h 192.168.0.102 info Replication
查看从服务角色信息: redis-cli -h 192.168.0.102 -p 6378 info Replication
进入客户端:redis-cli -h 192.168.0.102 -p 6379
redis一共有16个数据库源,用select选择
列出所有key: keys *
查看数据库大小:dbsize
清除当前数据库:flushdb
清除全部数据库:flushall
#获取redis的密码:config get requirepass