Lesson 3: User and Database Management / Learn

Code Summary: User and Database Management

Review the following code, which demonstrates how to create a new database user by using the Atlas CLI.

Create a New Database User

From the MongoDB Shell, run the following command to create a database user:

atlas dbusers create --username <username> --password <password> --role <role>@<database>.<collection>