examples icon indicating copy to clipboard operation
examples copied to clipboard

How to access redis with password?

Open huiali opened this issue 5 years ago • 8 comments

How to access redis with password?

huiali avatar Jul 07 '20 08:07 huiali

AFAIK you may be able to do this:

redis://HOST:PORT?db=0&password=PASSWORD

Source: https://metacpan.org/pod/URI::redis

robjtede avatar Jul 07 '20 11:07 robjtede

@robjtede Thank you for your reply. I use Actix redis. No matter how much I try, I can't access redis with a password.

huiali avatar Jul 08 '20 11:07 huiali

Hmm can u test redis-cli ping and check if u receive pong? and try this redis-cli -h 127.0.0.1 -p 6379 -a 'password' and make sure ur password don't have some weirdness.

shirshak55 avatar Jul 12 '20 14:07 shirshak55

I can connect using the redis 0.16 package, but I can't connect with actix-redis no matter how it is set. Does actix-redis not support redis connection with password? @shirshak55 @robjtede

huiali avatar Jul 15 '20 15:07 huiali

Send 'AUTH' command to redis server after connect

    let redis = actix_redis::RedisActor::start("redis://localhost:6379");
    // or redis.send(...).await
    redis.do_send(actix_redis::Command(resp_array![
        "AUTH",
        "password"
    ]));

actix-redis use redis-async crate internal

how to connect redis with password #49 - redis-async-rs

pymongo avatar Aug 02 '20 04:08 pymongo

How to access redis with password?

I also want to know

zhaoyii avatar Feb 27 '21 09:02 zhaoyii

I hope to provide a more convenient way to manage the settings of password keys like SpringBoot to configure them in the .env file.

OriginalLight avatar Nov 25 '21 02:11 OriginalLight

i expect https://github.com/actix/actix-extras/pull/212 will help with this with the new redis-rs based session backend

robjtede avatar Mar 06 '22 00:03 robjtede