redis如何修改默认密码

王林
王林 转载
2021-01-25 09:36:42 3782浏览

资源下载:

(学习视频分享:redis视频教程

https://github.com/MSOpenTech/redis/releases

997cc671afb7272b67c7f45f39c399d.png

添加密码

redis.windows.conf,默认无密码

6fbdf0500effc1bc138f8c341fc79b2.png

启动

redis-server.exe redis.windows.conf

如果redis-server.exe启动,无密码

882e367cee7be9aed8e530e5522ec79.png

登录

redis-cli.exe -h 127.0.0.1 -p 6379 -a 123456

(redis-cli.exe -h 127.0.0.1 -p 6379对应无密码服务启动,redis-cli.exe对应redis-server.exe直接启动)

查看密码

config get requirepass

52ceec698830daab45d8e3100cd7472.png

添加到Windows服务中

redis-server --service-install redis.windows.conf --loglevel verbose错误解决
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: 192.168.1.102/192.168.1.102:6379
Caused by: java.net.ConnectException: Connection refused: no further information

修改redis.windows.conf

1、protected-mode yes 改为:protected-mode no

2、注释掉 #bind 127.0.0.1

相关教程:redis数据库教程

以上就是redis如何修改默认密码的详细内容,更多请关注php中文网其它相关文章!

声明:本文转载于:csdn,如有侵犯,请联系admin@php.cn删除