DEV Community

Cover image for How to get mongodb url for discord bot ?
Khanmanan
Khanmanan

Posted on

How to get mongodb url for discord bot ?

Credits to msv

Join our discord server if u don't understand πŸ˜‘

Discord

Mongo Database Setup 🌿

  • Come on official MongoDB website. Register or Login into your account.
  • After registration, you will be transferred to another page. You need to click on the green button, then write the name of your project in the window that opens (no matter what you write, this will not affect the work.) Click on the green button. Examples:

  • After that, you will be asked to enter Add Members and Set Permissions. At this stage, you can just catch a cold, citing the green button (it plays no role.)

  • And so, we have created our project, now let's create a "cluster". Click on the Build a Cluster button, then in the window that opens, simply click the green Create cluster button (You can also change the name of the cluster if you wish, by default it is "Cluster0")

  • After you clicked on the Create cluster button. You should wait 1-3 minutes.

  • After our cluster has been created, you will see this picture:

  • Okay! The floor is done. Next, go to the Database Access tab. Screenshot:

  • After switching to this tab, we see a green button with the inscription ADD NEW USER, in the window that opens, set the rights "Atlas Admin". Then write your name and the desired password (it is worthwhile to understand that through these data you will enter the database. So write down your password on a piece of paper or notebook.) Save! Screenshot:

  • Now. Go to the Network Access tab.

  • We see a green button with the inscription ADD IP ADDRESS, poke. In the window that opens, in the line "Whitelist Entry", write the value 0.0.0.0/0. A comment is optional. We save.

  • [πŸŽ‰] Congratulations! We have created a base, now we need a link to connect to the base. To do this, again go to the Clusters tab

We see our newly created cluster. We find a button labeled CONNECT, press it. A window opens, click the second section ("Connect Using MongoDB Compass"). After that you will see the copy button (this link cannot be shown to people. If they find out the name and password from the database, they will be able to manage your database.)

Top comments (0)