Linux 拨号vps windows公众号手机端

redis如何设置密码

lewis 7年前 (2018-09-12) 阅读数 10 #VPS/云服务器
文章标签 redis

为redis设置密码的方法:1.启动redis服务;2.登录redis数据库;3.使用config命令设置密码;

具体步骤如下:

1.首先,在命令行中启动redis服务;

service redis start  

2.mysql服务启动后,输入用户名,登录redis数据库;

redis-cli.exe -h -p

3.登录到redis数据库后,在数据库中使用config命令即可设置密码;

#设置redis密码为123456

config set requirepass 123456

4.最后,redis密码密码设置好后,重复redis使用密码生效即可;

相关命令介绍:

1)查看redis数据库密码

config get requirepass

版权声明

本文仅代表作者观点,不代表米安网络立场。

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

热门