First and foremost, one would be required to enable authentication with MongoDB database. The details can be found on this page
Following steps can be used to create a database user:
use databaseName
db.createUser({ "user": "userName", "pwd": "somePassword", "roles": ["dbOwner"], });
Above command would create user with with role such as dbOwner. The details on creating users can be found on this page covering the description on creating users – db.createUser() The user with role such as dbOwner can perform any administrative action on the database. The role combines the privileges granted by the readWrite, dbAdmin and userAdmin roles.
Following are some of the roles which can be associated with the user:
The details on above roles can be found on this page, MongoDB Built-in User Roles.
Last updated: 2nd May, 2024 The success of machine learning models often depends on the…
When working on a machine learning project, one of the key challenges faced by data…
Last updated: 1st May, 2024 The bias-variance trade-off is a fundamental concept in machine learning…
Last updated: 1st May, 2024 As a data scientist, understanding the nuances of various cost…
Last updated: 1st May, 2024 In this post, you will learn the concepts related to…
Last updated: 26th April, 2024 In this blog post, we will discuss the logistic regression…