我需要设置到MongoDB的远程连接,但我需要通过mongojs进行连接。var docdbconn = mongojs('mongodb+srv://mylogin:mypassword@cluster0-m1s1a.mongodb.net/nameofdatabase?retryWrites=true'); 通常我会得到下一个错误: MongoError: failed to connect to server [cluster0-m
我将我的应用程序设置为使用mongoose连接到mongodb数据库,并认为我做得很正确;然而,当我运行该应用程序时,我收到了下面的错误消息。mongoose.connect('mongodb://http://localhost:27017/userDB', {useNewUrlParser: true, useUnifiedTopologyENOTFOUND http
at Na
尝试使用猫鼬库将MongoDB与replicaSet连接字符串连接起来。但是没有连接到生产服务器上,它将我抛回一个错误: message: 'failed to connect to server [test-machine:27018] on first connect [MongoError: getaddrinfoENOTFOUND test-machine:27018 test-machi