<p><span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255); font-size: 16px;">默认不需要的,均可以登录。即便是设置了密码,也是不需要</span>用户名<span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255); font-size: 16px;">的,redis服务是主机加密码认定的。</span></p><p><span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255); font-size: 16px;">但是区分操作系统,一部分Linux是默认不可以远程登录的,有protected yes 字段保护,只有指定了密码才可以进行远程。但是Windows系统是可以默认下远程登录的。当然也可以绑定主机,进行保护。</span></p><p style="text-align: start;"><span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255); font-size: 16px;">可以在redis.conf中修改配置。找到requirepass password 其中password为你指定的密码,重启redis-server即可生效。然后,客户端连接的时候,输入auth password 即可登录。</span></p><p style="text-align: start;"><span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255); font-size: 16px;">当然也可以登录后</span>命令行<span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255); font-size: 16px;">修改,登陆后输入</span></p><p style="text-align: start;"><span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255); font-size: 16px;">config get requirepass //获取当前密码</span></p><p style="text-align: start;"><span style="color: rgb(51, 51, 51); background-color: rgb(255, 255, 255); font-size: 16px;">config set requirepass newpassword //设置新的密码newpassword</span></p>
讯享网

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/144204.html