Connecting robot to Mongo DB

Hi, I am building a robot in Python and RF that will have connection with MongoDB.

Now I need to provide user name and password for MongoDB in my .env file to run the robot.
The thing is that my MongoDB connects only using connection string mongodb://localhost:27017. I am inside my MongoDB just by opening Mongo Compass and click Connect button. I open Mongo shell by giving a connection string.

Where should I find info on my username or password… and where should i put these to enter my MongoDB? I also created a new user in admin database with admin rights. Should this do the trick?

Okay so I found this. I entered the MongoDB using my new username and password. Is there anything else needs to be done to enter MongoDB from Robot?

Problem solved! That was exactly what was needed.

1 Like