redis设置密码(windows)

谁借莪1个温暖的怀抱¢ 2022-05-10 00:50 427阅读 0赞

在Redis中找到redis.windows-service.conf这个文件并以记事本(或者Notepad++)的方式打开,找到修改密码这一段:

  1. ################################## SECURITY ###################################
  2. # Require clients to issue AUTH <PASSWORD> before processing any other
  3. # commands. This might be useful in environments in which you do not trust
  4. # others with access to the host running redis-server.
  5. #
  6. # This should stay commented out for backward compatibility and because most
  7. # people do not need auth (e.g. they run their own servers).
  8. #
  9. # Warning: since Redis is pretty fast an outside user can try up to
  10. # 150k passwords per second against a good box. This means that you should
  11. # use a very strong password otherwise it will be very easy to break.
  12. #
  13. # requirepass foobared

# requirepass foobared 后面加上这么一行:requirepass 这里是你的密码

  1. ################################## SECURITY ###################################
  2. # Require clients to issue AUTH <PASSWORD> before processing any other
  3. # commands. This might be useful in environments in which you do not trust
  4. # others with access to the host running redis-server.
  5. #
  6. # This should stay commented out for backward compatibility and because most
  7. # people do not need auth (e.g. they run their own servers).
  8. #
  9. # Warning: since Redis is pretty fast an outside user can try up to
  10. # 150k passwords per second against a good box. This means that you should
  11. # use a very strong password otherwise it will be very easy to break.
  12. #
  13. # requirepass foobared
  14. requirepass 0123456

重新启动Redis,密码生效

在这里插入图片描述

发表评论

表情:
评论列表 (有 0 条评论,427人围观)

还没有评论,来说两句吧...

相关阅读