我已将该IP列入白名单,该用户具有特权,并且得到: “连接错误:MongoError:首次连接[MongoError:getaddrinfo ENOTFOUND cluster0-xxxx.mongodb.net cluster0-xxxx.mongodb.net:27017]时,首次连接服务器[cluster0-xxxx.mongodb.net:27017]失败
代码为: mongoose.connect(process.env.URL,{ useMongoClient:是的, useUnifiedTopology:正确 });
URL: URL = mongodb:// user:password@cluster0-xxxx.mongodb.net/dabname?authSource = admin&ssl = true&retryWrites = true&w = majority