zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

mac redis客户端_redis关闭服务器命令

2023-06-13 09:11:13 时间

大家好,又见面了,我是你们的朋友全栈君。

我选择的是直接使用Mac的Homebrew工具安装redis,可以节省很多配置的时间。

1.安装命令

brew install redis

2.使用配置文件启动redis $ redis-server 或brew services start redis

3.连接远程服务器的数据库

$ redis-cli -h host -p port -a password

//eg:$ redis-cli -h 192.168.11.225 -p 6379 -a “password”

//eg: $redis-cli -h test-redis.dns.xx.com -p 6379 -a

没有密码可以 -a 后面为空

4.断开连接

quit

5.操作

列出所有的key

key *

列出匹配的key

key abc*

及列出 abc122 abc222 abc224

6.redis命令大全

https://www.cnblogs.com/kevinws/p/6281395.html

http://redisdoc.com/index.html#

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/193207.html原文链接:https://javaforall.cn