mongodb - Mongo DB Authentication 3.0.4 -


i having issue mongo db 3.0.4 randomly started happening today. authentication stopped working randomly without user action on our part. our setup easy. 1 application, 1 database. take application out of equation , still same result. here steps taking. reinstalled mongo , pointed logpath , dbpath new folder start scratch.

create config file.

logpath=c:\data\logs\mongod.log dbpath=c:\data\db 

log in mongo shell , run command.

db.createuser({user: "admin",pwd: "admin", roles: [ { role: "useradminanydatabase", db: "admin" }]}) 

add auth=true in config file.

auth=true 

restart mongodb service.

start mongo shell

mongo -u admin -p admin --authenticationdatabase admin 

then error 18 authentication failed.

i lost words. appreciated.

thanks

i think user doesn't have efficient privileges. try role.

use admin {user:"admin",pwd:"admin",roles:["root"]} 

Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -