I have set up a MongoDB database with an admin user that has only administrative rights, not read or write access to databases.
admin
What I now would want to do
Above in my case didn't worked
use dummyDb db.createUser({user: "admin",pwd: "secrectP@wd",roles: [ { role: "readWrite", db: "reporting" } ],mechanisms: [ "SCRAM-SHA-256" ] }