Skip to content

Instantly share code, notes, and snippets.

@sbdh11
Created March 18, 2021 13:25
Show Gist options
  • Save sbdh11/0de27e6088822302dcb27db1827d64c1 to your computer and use it in GitHub Desktop.
Save sbdh11/0de27e6088822302dcb27db1827d64c1 to your computer and use it in GitHub Desktop.
Basic Tutorial for beginners on how to get a MongoDB Cluster Database URL

📝 MongoDB Cluster Database URL

As Many people were having troubles on generating an MongoDB Cluster Database URL. Just follow these steps, and you are good to go!

Note : Please read The Official MongoDB Documentation since they have actual docs and details about how MongoDB actually works.

1) Making an Account

  • In order to create a database, You need to create an account in the cloud. You can Register through Here

2) Creating an Cluster

  • Once, you've registered yourself and made an account in the cloud. You can click on New Project then head over to the Clusters tab and hit on Build a Cluster

Cluster Tab Create New Cluster

3) Connecting to the Cluster

  • As you created your first Cluster, You will need to whitelist your IP in order to connect to the database. First Click on the Connect button.

Connect

  • Then go ahead and WhiteList your IP by Adding it, Then create a Username and Password (You'll need them in order to connect to the db)

Creating & Whitelisting

4) Choosing a connection Method

  • Since we are focused on creating the Application in order to get a database URL, Click on Connect your Application out of the three

Application

5) Getting the Database Link

  • Once you hit Connect your Application. You will see an option to select your driver and the version. In my case, I am using Node.js.

Driver

  • After selecting your Driver and the Version, MongoDB will auto generate you a link for the database. You just need to Replace <password> with the password & Replace myFirstDatabase with the name of the database that connections will use by default.

Database Link

✨ There you have it, You've successfully generated a MongoDB Cluster Database URL!

  • Note: You can Access your database by going into the Collections tab. Metrics Tab will show you seperate charts and graphs providing the info stored in your database
Copy link

ghost commented May 20, 2021

Thanks! u helped me <3

@Jes-debug
Copy link

i dont see clusters

@sbdh11
Copy link
Author

sbdh11 commented Jul 18, 2021

i dont see clusters

You need to create a new project for it, Then the clusters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment