0

I was in trouble with deleting the users in mongodb3.6.

I created a user with:

db.createUser({ user: "username" , pwd: "password", roles: ["root"]})

And I deleted it with:

db.dropUser("username")

Also in mongodb.conf I commented :

auth = true

However, afer restarting mongo, I tried to check the dbs and I got an error like this: enter image description here

How could I solve this problem?

  • You enabled authorization and re-started mongod. So now you need to get authenticated to check the dbs. – Mani Jun 12 at 17:53
  • I'm sorry. I think I made a mistake when describe the problem that I should say I commented the statement about the authentication, and I still can't solve the problem now. – jing peng Jun 13 at 0:34
  • This scenario is perfectly working fine for me. Please check mongod.log for any useful information. – Mani Jun 14 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.