当我尝试使用mongoose连接mongodb时发生以下错误。
{ db: { native_parser: true },
server: { poolSize: 5 },
user: '',
pass: '' }
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +++++运行于:http://127.0.0.1:5000 DB错误作业的服务器:{[MongoError: auth failed] name:'MongoError',message:'auth failed',ok:0, errmsg:'auth failed',代码:18} var option = {db:{native_parser: true},server:{poolSize:5},user:db.username,pass:db.password,}
mongoose.connect(option,option,function(err){if(err){process.exit(1);} else {console.log('MongoDB Connected',mongoUrl); }})