Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我给redis设置密码了,c#代码里面要怎么写? #40

Open
zhaoguoping opened this issue Apr 6, 2021 · 5 comments
Open

我给redis设置密码了,c#代码里面要怎么写? #40

zhaoguoping opened this issue Apr 6, 2021 · 5 comments

Comments

@zhaoguoping
Copy link

redis我设置了密码,我要在配置在哪里?现在报错IM无法使用
"ImServerOption": {
"CSRedisClient": "127.0.0.1:6379,idleTimeout=3000,poolsize=10",
"Servers": "127.0.0.1:6001",
"Server": "127.0.0.1:6001"
},

@2881099
Copy link
Owner

2881099 commented Apr 6, 2021

看 freeredis 文档介绍,设置密码

@zhaoguoping
Copy link
Author

我的是csredis版本的,

@zhaoguoping
Copy link
Author

"ImServerOption": {
"CSRedisClient": "127.0.0.1:6379,Password=1111,idleTimeout=3000,poolsize=10",
"Servers": "127.0.0.1:6001",
"Server": "127.0.0.1:6001"
},如上面,在ip端口后面,加上password=111,这样子不行啊

@5653325
Copy link

5653325 commented Apr 12, 2021

"ImServerOption": {
"CSRedisClient": "127.0.0.1:6379,Password=1111,idleTimeout=3000,poolsize=10",
"Servers": "127.0.0.1:6001",
"Server": "127.0.0.1:6001"
},如上面,在ip端口后面,加上password=111,这样子不行啊

看CSRedisCore文档吧。

@Camio1945
Copy link

试了一下,首字母是不能大写的,Password 改成 password 就可以了,比如:
"CSRedisClient": "127.0.0.1:6379,password=1111,poolsize=10",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants