> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superjoin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Acquire MongoDB Credentials?

> Proceed with the outlined steps to acquire MongoDB credentials.

## Step-by-step walkthrough: How to obtain MongoDB credentials

<Steps titleSize="h3">
  <Step title="Log in to the MongoDB Atlas dashboard." />

  <Step title="Database Access">
    From the dashboard, click on `Database Access` under `Security`

    <Frame>
      <img src="https://assets.superjoin.ai/images/mongodb/mongo-s1.png" />
    </Frame>
  </Step>

  <Step title="Add User">
    Click on the `+ ADD NEW DATABASE USER` button.

    <Frame>
      <img src="https://assets.superjoin.ai/images/mongodb/mongo-s2.png" />
    </Frame>
  </Step>

  <Step title="Auth Method">
    On the `Add new Database User` modal dialog, choose `Password` for the `Authentication Method`.

    <Frame>
      <img src="https://assets.superjoin.ai/images/mongodb/mongo-s3.png" />
    </Frame>
  </Step>

  <Step title="Read-Only Setup">
    In the `Password Authentication` section, set the username to READ\_ONLY\_USER in the first text box and set a password in the second text box.

    <Frame>
      <img src="https://assets.superjoin.ai/images/mongodb/mongo-s7.png" />
    </Frame>
  </Step>

  <Step title="User Privileges">
    Under `Database User Privileges`, click on `Select one built-in role for this user` under `Built-in Role` and choose `Only read any database`.

    <Frame>
      <img src="https://assets.superjoin.ai/images/mongodb/mongo-s4.png" />
    </Frame>
  </Step>

  <Step title="Give Access">
    Enable `Restrict Access to Specific Clusters/Federated Database instances` and enable only those clusters/database that you wish to replicate.

    <Frame>
      <img src="https://assets.superjoin.ai/images/mongodb/mongo-s5.png" />
    </Frame>
  </Step>

  <Step title="Save User">
    Click on `Add User` at the bottom to save the user.

    <Frame>
      <img src="https://assets.superjoin.ai/images/mongodb/mongo-s6.png" />
    </Frame>
  </Step>
</Steps>

## Setting up MongoDB

<CardGroup cols={1}>
  <Card title="Looking for MongoDB?" icon="life-ring" iconType="duotone" href="../mongodb/overview">
    Head over to the MongoDB page to get a step by step guide to connect.
  </Card>
</CardGroup>
