【发布时间】:2023-01-11 17:15:06
【问题描述】:
我如何连接到具有用户名和密码的Redis 数据库?
下面是我尝试使用的代码示例,(我正在使用nodejs与node-redis和Redis版本“redis”:“^3.0.0”,)
const client = redis.createClient({
host: "localhost",
port: 6379,
password: "1234",
username: "username"
});
【问题讨论】:
-
你得到哪个错误?
-
我没有收到任何错误,但这是实现它的正确方法吗?很难找到关于此的任何文档