package main
import (
"fmt"
"github.com/gomodule/redigo/redis"
)
func main(){
conn, err :=redis.Dial("tcp", "ip:6379")
if err != nil{
fmt.Println("redis.Dial err", err)
}
defer conn.Close()
res, err := conn.Do("set", "foo123", "test")
fmt.Println(res)
}
terminal中一直报错
MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.
按照网上的教程设置了redis.conf中的配置有yes改为no依旧无效
stop-writes-on-bgsave-error no
依旧无效,有大佬知道原因吗?
重启redis服务了嘛?