I want to create a new user who can access( read/write) on a single database but not view other databases.
I am running the following command to create user:-
db.createUser({user:"user1",pwd:"user1",roles:[{ role: "read", db: "db1" }];
When I authenticate with user1 user then I am able to insert documents in db1 collections and also in other database also.
What is the correct query to grant access on a single database only?
Thanks in advance.