redis操作

开启服务端 redis-server.exe redis.windows.conf
开启客户端
redis-cli.exe -h 127.0.0.1 -p 6379
设置键值对
set myKey abc
取出键值对
get myKey
查看配置
CONFIG GET *
修改配置 通过修改 redis.conf 文件或使用 CONFIG set 命令来修改配置 :
CONFIG SET loglevel "notice"
3
port 6379
指定 Redis 监听端口,默认端口为 6379,作者在自己的一篇博文中解释了为什么选用 6379 作为默认端口,因为 6379 在手机按键上 MERZ 对应的号码,而 MERZ 取自意大利歌女 Alessia Merz 的名字
4
bind 127.0.0.1
绑定的主机地址
 
posted @ 2019-12-04 15:25  zdcsmart  阅读(80)  评论(0编辑  收藏  举报