# MongoDB

**1. First, Go to** [**mongo.com**](https://www.mongodb.com/) **then Sign Up there.**

<figure><img src="https://2876260724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmvyIvpVGvcfQYUOMGYA7%2Fuploads%2FSdJYCNsgAoNItHMAIrBe%2Fimage%20(1).jpg?alt=media&#x26;token=51bcc098-6cd9-4c1e-8929-5c15ac99b65e" alt=""><figcaption><p>Sign up on Mongo Db first of all</p></figcaption></figure>

**2. Login or Sign Up (Create an Account) there. If you don’t have an Account!**

<figure><img src="https://2876260724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmvyIvpVGvcfQYUOMGYA7%2Fuploads%2F9BEk5uA36cT8Acw7CbL5%2FScreenshot%202025-04-13%20205105.png?alt=media&#x26;token=ed14a179-d6ee-472f-a88a-927ab54c6475" alt=""><figcaption><p>Sign up with Google or Temp mail whatever you want</p></figcaption></figure>

**3. You'll see a deploy cloud database option. Please select Shared Hosting under&#x20;*****Free Plan*****&#x20;Here**

Select the server location nearby your location, So that it work fast and efficient.

<figure><img src="https://2876260724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmvyIvpVGvcfQYUOMGYA7%2Fuploads%2Frq4SthGoKxJ22sr3Rvzd%2F2.%20(1).jpg?alt=media&#x26;token=22b06137-27a5-49a2-be77-87d166e89077" alt=""><figcaption><p>Select free hosting and Select your server and region now.</p></figcaption></figure>

**4. Your database cluster is being created now. It can take upto 2-3 mins. Till then we can set other settings.**

<figure><img src="https://2876260724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmvyIvpVGvcfQYUOMGYA7%2Fuploads%2FOkcP5XSgQoklPsRmYSdB%2FScreenshot%202025-04-13%20212020.png?alt=media&#x26;token=6b12aadc-e848-4c81-b60c-7d6581ee5088" alt=""><figcaption><p>Please wait, Till its being created.</p></figcaption></figure>

**5. Click on QuickStart under security tab. Input any username and password there and press create user.**&#x20;

Don't use any special character in your username or password like *!@#$%* etc... Make it simple

<figure><img src="https://2876260724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmvyIvpVGvcfQYUOMGYA7%2Fuploads%2Fcey28VJV5U34bhnxipuS%2F2.%20(2).jpg?alt=media&#x26;token=49de50e4-e963-4d1e-a8cc-a24a97213e56" alt=""><figcaption><p>Create a user now.</p></figcaption></figure>

**6. Scroll down to configure Network Access. Click on Add IP Address.**

**make sure its 0.0.0.0/0 and click Confirm**

<figure><img src="https://2876260724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmvyIvpVGvcfQYUOMGYA7%2Fuploads%2F56gQ6e2emYLR5bsP2EUB%2F2.%20(3).jpg?alt=media&#x26;token=d3321874-50b3-416a-a4aa-775cd182b1d1" alt=""><figcaption><p>Add an ip address</p></figcaption></figure>

**7. We have successfully configured Mongo Db now. Its time to connect it. Goto Database section and click on connect.**

<figure><img src="https://2876260724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmvyIvpVGvcfQYUOMGYA7%2Fuploads%2FVjO5j2kUyCpaCSicc1Qv%2F2.%20(4).jpg?alt=media&#x26;token=196c7e0a-a93e-4336-a1a6-fc6abaff3c92" alt=""><figcaption><p>Click on connect</p></figcaption></figure>

**8.  Configure the connection setting here. Select the user and under drivers select python as language.**

**And then copy the mongodb URI.**

<figure><img src="https://2876260724-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmvyIvpVGvcfQYUOMGYA7%2Fuploads%2F7PZyFe2FEv4CgFdBWEsO%2F2.%20(5).jpg?alt=media&#x26;token=62ef8a99-b24b-4bfb-80c3-84096c57877b" alt=""><figcaption></figcaption></figure>

**19. We have succesfully got our MONGO DB URL now. Replace `<password>` with your password and use it.**

```
mongodb+srv://stranger:<db_password>@stranger.quc2tlw.mongodb.net/?retryWrites=true&w=majority&appName=Stranger
```

Replace the `<password>`  with the actual password for the user you configured in the step 5

Final MongoDB URI looks like this&#x20;

```
mongodb+srv://stranger:stranger@stranger.quc2tlw.mongodb.net/?retryWrites=true&w=majority&appName=Stranger
```
