redis操作总结(更新中)

本地启动redis

ps -ef | grep redis
cd /usr/local/redis/bin
./redis-server //使用默认配置启动(比如默认不加载密码)
./redis-server ../etc/redis.conf  //使用配置文件启动

redis-cli -h 127.0.0.1 -p 6379 //登录redis(无密码)
redis-cli -h 127.0.0.1 -p 6379 -a XXX //登录redis(密码)
auth XXX

redis命令操作
redis命令集合

问题集

ERR Client sent AUTH, but no password is set

  • 原因:redis没有设置命令,但客户端连接时使用了auth请求
  • 解决:设置密码,使用配置文件启动

MISCONF Redis is configured to save RDB snapshots
127.0.0.1:6379> config set stop-writes-on-bgsave-error no

猜你喜欢

转载自blog.csdn.net/weixin_40632321/article/details/83618213
今日推荐