At first there is no authentication in mongodb, so I created one for one database with readWrite
role.
Now I want to create more users for other databases but as this user doesn't have the privileges to create other users I'm stuck.
At first there is no authentication in mongodb, so I created one for one database with readWrite
role.
Now I want to create more users for other databases but as this user doesn't have the privileges to create other users I'm stuck.
Copyright © 2021 Jogjafile Inc.
The documentation clearly says:
If you haven't created such user, you cannot create it now with authentication and access rights enabled. I gues you need to restart the MongoDB server without authentication enabled, create that admin user, and restart the MongoDB server again with authentication enabled.
I highly recommend you read to complete documentation how to enable authentication first to understand the complete concept, before you follow it step by step. Otherwise it might be confusing and creating such state you are currently locked in and cannot continue with all actions.