Question: how to create user for database in mongodb?
Answer: The first step is to specify the "username" and "password" which needs to be created.
The second step is to assign a role for the user which in this case since it needs to be a database administrator is assigned to the "userAdmin" role.