How to set password for Redis?

后端 未结 10 1403
长发绾君心
长发绾君心 2021-01-29 19:17

I\'m working with redis on my local machine so I dont really need to set up a password to connect to the server with my php client (I\'m using predis as a client). However, I\'

10条回答
  •  自闭症患者
    2021-01-29 19:57

    Example:

    redis 127.0.0.1:6379> AUTH PASSWORD
    (error) ERR Client sent AUTH, but no password is set
    redis 127.0.0.1:6379> CONFIG SET requirepass "mypass"
    OK
    redis 127.0.0.1:6379> AUTH mypass
    Ok
    

提交回复
热议问题