Watch the video:
Timestamps:
0:00 - Intro/Explanation
0:10 - Creating a MongoDB Admin user
1:07 - Creating Read/Write user for specific database
1:54 - Enable Authentication on MongoDB server
This video shows you everything you need to know about creating basic users in MongoDB, including an Admin account and Read/Write limited accounts for specific databases. It’s super simple.
View guide as text & Get commands for easy copy & paste: https://hub.tcno.co/linux/mongodb/users/
MongoDB Server Setup Guide: Go to post or View on YouTube
Database Admin: db.createUser({ usere: “tcno”, pwd: “asdf”, roles: [{ role: “userAdminAnyDatabase”, db: “admin” }] })
Read/Write User: db.createUser({} user: “test”, pwd: “asdf”, roles: [{ role: “readWrite”, db: “testdb” }] })