tombatron / NRedisGraph

28 stars 8 forks source link

How to specify the password used to connect? #11

Closed TonyHenrique closed 3 years ago

TonyHenrique commented 3 years ago

I created a new Redis Graph on https://app.redislabs.com/ and it has a random password that the service created.

I tried to connect to it:

var muxr = ConnectionMultiplexer.Connect("[mydatabase].azure.cloud.redislabs.com:13788");// ("127.0.0.1");

But it throws this Exception:

StackExchange.Redis.RedisConnectionException: 'It was not possible to connect to the redis server(s). There was an authentication failure; check that passwords (or client certificates) are configured correctly. AuthenticationFailure (None, last-recv: 264)

How to specify the password that NRedisGraph uses to connect to the server?

tombatron commented 3 years ago

Hi there Tony!

You'll want to review the documentation for StackExchange.Redis here: https://stackexchange.github.io/StackExchange.Redis/Configuration

I believe in your case you'll want to do something like:

var muxr = ConnectionMultiplexer.Connect("[mydatabase].azure.cloud.redislabs.com:13788,user=whatever,password=thepassword");
TonyHenrique commented 3 years ago

Thank you!

After reading your answer and that documentation, I used:

var muxr = ConnectionMultiplexer.Connect("[mydatabase].[region].azure.cloud.redislabs.com:[port],password=thepassword");

and it worked!