I installed MEAN on https://bitnami.com/stack/mean for Windows 7. When I install, I make the password 123456
Syntax make connect to mongodb with mongoose
mongoose.connect("mongodb://[usr]:[pwd]@localhost:[port]/[db]",{auth:{authdb:"admin"}});
If you haven't
{auth:{authdb:"admin"}}
The error message "MongoError: auth failed" appears
Example: mongo-test / app.js
var mongoose = require('mongoose');
mongoose.connect('mongodb://root:123456@localhost/test',{auth:{authdb:"admin"}});
mongoose.set('debug', true);
source
share