I added a user as below.
db.createUser( { user: "Username", pwd: "Password", roles: [ { role: "root", db: "admin" } ] } )
But when I create DB with this user, db gets deleted automatically and does not appear in next session.
I checked log and found out that a command runs through CMD to delete my DB.
Can someone please advise if something is wrong with the user?
--auth
option after creating the user. What do you mean by "create DB"? Do you add records to a collection? Also, can you provide relevant parts of the mongodb logs? – AxxE