Redis:Creating Server TCP listening socket *:6379: bind: No such file or directory解决方案

使用redis-server启用redis服务器出现以下问题的解决方法
在这里插入图片描述
解决方法:
对于[8348] # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf错误
意思是没有默认的conf文件
解决方法:
切换到redis对应的目录,把命令改成:

redis-server.exe   redis.windows.conf

再次重新启动即可。

启动后发现[8348] # Creating Server TCP listening socket *:6379: bind: No such file or directory问题依然存在,可按以下方法解决
解决方法:
在cmd中依次输入以下指令:

redis-cli.exe
127.0.0.1:6379>shutdown
(error)NOAUTH Authentication required
127.0.0.1:6379>AUTH 123456
OK
127.0.0.1:6379>shutdown
not connected>exit
redis-server.exe

成功后显示截图如下,即为启动成功:
在这里插入图片描述
总结:
redis使用完毕,将redis进行shutdown,养成好的习惯。
redis-cli shutdown,这样可以避免redis正在将内存中的数据同步到硬盘中,因为强行终止redis进行可能会导致数据丢失

猜你喜欢

转载自blog.csdn.net/weixin_40687614/article/details/107124070
今日推荐