Create a Database User for Your Cluster¶
Estimated completion time: 2 minutes
You must create a database user to access your cluster. For security purposes, Atlas requires clients to authenticate as MongoDB database users to access clusters.
Database users are separate from Atlas users:
- Database users can access databases hosted in Atlas.
- Atlas users can log in to Atlas but do not have access to MongoDB databases.
To add a database user to your cluster:
- Click Database in the top-left corner of Atlas.
- In the Database Deployments view, click Connect for the cluster or serverless instance to which you want to connect.
Atlas highlights the Setup connection security step.
Set the new user's Username and Password.¶
You'll use this username and password combination to grant a user access to databases and collections in your cluster in this Atlas project.
To use a password auto-generated by Atlas, click Autogenerate Secure Password.
If you use special characters in your password, you will need to escape them later in the connection string that you will use to connect to your cluster. To learn more, see Special Characters in Connection String Password.
Click Create Database User.¶
To learn more about configuring additional database users on your cluster, see Configure Database Users.
Now that you have a database user for your cluster, proceed to Connect to Your Cluster.