MongoDB

Unauthorized dropDatabase in MangoDB

Normally when you want to drop a database in MongoDB, you just need these command. > use mydatabase; switched to db mydatabase > db.dropDatabase(); Error message with Unauthorized But when you see this error, it mean you are not authorized and not enough level access to run the command. Drop database in MongoDB, you need MongoDB root role. { “ok” : 0, “errmsg” : “not authorized on mydatabase to execute command { dropDatabase: 1.0, writeConcern: { w: \”majority\”, wtimeout: 600000.0 }, lsid[…]

Unauthorized dropDatabase in MangoDB Read More »