Redisauth

 

redis服务器才开始的时候,是没有密码验证的, 只有在配置文件--redis.conf ,requirepass的注释去掉,才会有进行验证的

e.g.1

    redis 之 auth

 

 

此处需要注意的是,这个文件的位置,当你安装后却不知道,redis.conf的位置的时候,可以用下面的命令来找到redis.conf的位置

sudo find  / -name “redis.conf”

如果不加sudo, 会提示权限不足

 

当配置好密码之后,此时我们可以用如下命令重新启动redis 服务 service redis restart


此时;进行验证的有两种方式,

(1) 启动客户端时  redis-cil -h 127.0.0.1 -p 6379 -a ysd941018

(2) 启动客户端时  redis-cil -h127.0.0.1 -p 6379

     当连接成功后,auth命令进行验证, 如果没有进行验证会出现下面的东西

  redis 之 auth

 

 

 

 

 

 

 

 

 

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-15
  • 2022-03-05
猜你喜欢
  • 2021-09-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-16
  • 2022-02-25
相关资源
相似解决方案