root role in mongodb1 min read

We need your support!!
Other Amount:
techrunnr.com:
24-Hour Flash Sale. Courses from just ₹ 490.
Prabhin Prabharkaran Administrator
DevOps Engineer

He is a Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!

follow me

Hi All, this document deals with to add a user in MongoDB with root role. This user will have the super admin access over the admin database to perform all admin related activities.

Step 1: Login to mongo shell.

mongo

Step 2: create a user with root role.

db.createUser(
{
user: 'adminuser',
pwd: 'yourpassword',
roles: [ { role: 'root', db: 'admin' } ]
}
);

We need your support!!
Other Amount:
techrunnr.com:
#1
#2
#3
Questions Answered
Articles Written
Overall Points

Prabhin Prabharkaran

He is Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!!

You may also like...

Leave a Reply