Docs Menu

Create a Database User for Your Cluster

On this page

  • Procedure
  • Next steps

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:

1
  1. Click Databases in the top-left corner of Atlas.
  2. 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.

2

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.

Note

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.

3
Tip
See also:

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.

Give Feedback
MongoDB logo
© 2021 MongoDB, Inc.

About

  • Careers
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2021 MongoDB, Inc.