db.createUser({
... user: "enduser",
... pwd: "12345",
... roles: [
... { role: "readWrite", db: "local-base" }
... ]
... })
MongoDB shell version v3.4.6
connecting to: mongodb://127.0.0.1:27017
MongoDB server version: 3.4.6
2017-07-16T13:27:02.007-0400 E QUERY [thread1] Error: Authentication failed. :
DB.prototype._authOrThrow@src/mongo/shell/db.js:1461:20
@(auth):6:1
@(auth):1:2
exception: login failed