Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- connection error: { [MongoError: auth failed] name: 'MongoError', ok: 0, errmsg: 'auth failed', code: 18 }
- 2015-06-13T15:10:09.863-0400 I ACCESS [conn8] authenticate db: mydatabase { authenticate: 1, user: "user", nonce: "xxx", key: "xxx" } 2015-06-13T15:10:09.863-0400 I ACCESS [conn8] Failed to authenticate user@mydatabase with mechanism MONGODB-CR: AuthenticationFailed UserNotFound Could not find user user@mydatabase
- {
- "_id" : "mydatabase.user",
- "user" : "user",
- "db" : "mydatabase",
- "roles" : [
- {
- "role" : "readWrite",
- "db" : "mydatabase"
- }
- ]
- }
- mongoose.connect('mongodb://user:password@host:port/mydatabase');
- mongoose.connect('mongodb://host:port/mydatabase',{user: 'user',pass: 'password'});
- mongo mydatabase -u user -p password
- db.createUser({
- user: "user",
- pwd: "password",
- roles: [
- { role: "readWrite", db: "mydatabase" }
- ]
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement