Code in this video_How to Secure MongoDB with Username and Password on Linux
📌 Replace the highlighted orange section with your information db.createUser( { user: "Your-Username", pwd: "Your-Password", roles: [ { role: "Your-Role", db: "admin" } ] } ) Your-Role userAdminAnyDatabase or root db.createUser( { user: "Your-Username", pwd: "Your-Password", roles: [ { role: "userAdmin", db: "Your-Database" } ] } ) authorization: "enabled"