当我用redis set 一个值的时候报错:
MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
解决方法:
方案一:修改redis.conf
大概第246行 默认是dir=./ 修改为一个有读写(755)权限的路径 ,例如:dir=/usr/local/redis/tmp
然后把dump.rdb(默认在redis的bin目录下)拷贝到该目录下并设置权限为644
最后重启redis服务
在cli下输入
BGSAVE
方案二(忽略错误):在cli下 输入
config set stop-writes-on-bgsave-error no