With MongoDB Compass is it possible to see users for a database or create new ones?
To list existing users in MongoDB, you can use the db. getUsers() method to show all of the users within the current database.
By default mongodb has no enabled access control, so there is no default user or password. To enable access control, use either the command line option --auth or security.
MongoDB Atlas does not have a default user/password combination. To enable access to a cluster you need to: Add a new database user with appropriate permissions.
For users created in MongoDB, MongoDB stores all user information, including name , password , and the user's authentication database , in the system. users collection in the admin database. Do not modify this collection directly. To manage users, use the designated user management commands.
Ive managed it on the command line with:
mongo use (my database name) db.createUser( { user: "myuser", pwd: "password", roles: ["readWrite"] })
However I would still much prefer a GUI to do this.
No, it isn't (at least until version 1.20.4 of Compass)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With