首页 > 数据库 >今天使用springboot连接redis,报错:Redis is running in protected mode because protected mode is enabled,adopt

今天使用springboot连接redis,报错:Redis is running in protected mode because protected mode is enabled,adopt

时间:2022-12-30 20:34:22浏览次数:47  
标签:配置文件 文件名 redis protected 报错 mode conf

这是因为redis的配置文件reids.conf配置了保护模式,protected-mode

解决:

1.vi 文件名进入文件,/protected-mode快速定位,把这个模式关闭

2.一旦修改了配置文件,需要重写启动redis服务器,在启动时,需要加载配置指定的conf文件

执行redis-server redis.conf &

3.如果出现/no such file or directory,使用mkdir -p 接报错的文件名,新建

 

补充:

1.rm 文件名,删除文件

2.关闭redis,查看进程ps -ef | grep redis还是有进程在?使用kill 第一个名,杀死进程,再systemctl restart redis重启redis.

标签:配置文件,文件名,redis,protected,报错,mode,conf
From: https://www.cnblogs.com/pilpill/p/17015752.html

相关文章