本地启动redis

1.修改配置文件


本地启动需将ip绑定为127.0.0.1,如需要远程连接服务则修改为0.0.0.0

2.将redis加入服务并启动

 D:\Redis-x64-3.2.100>redis-server.exe redis.windows.conf

3.启动redis出现如下报错


解决方法为:
在redis安装目录下打开cmd并执行命令

 D:\Redis-x64-3.2.100>redis-cli.exe
 127.0.0.1:6379> shutdown
 not connected> exit

然后关闭窗口再次执行第2步中的命令。
如果执行shutdown命令报错-NOAUTH Authentication required.则先命令输入一下redis的密码(默认为requirepass 123456)

 127.0.0.1:6379> auth 123456
OK

启动成功

posted @ 2024-01-23 10:38  山茶花llia  阅读(102)  评论(0编辑  收藏  举报