Ide not connect from local mongodb

when I connected from localhost MongoDB the connection refused

Post a screenshot of what you are doing that shows the issue you are having.

Provide a better context. Where is MongoDB running?

A connection refused occurs when you are trying to connect to a mongod that is not running, so it can be wrong address, wrong port. If on Atlas it is possible if the IP you connect from is not allowed, set Network Security to correct.

when i want to connect Ide from my local Mongodb server it gives this error. When i connect this address from Mongodb compass it connnect successfuly.

Hey @Virus_Hacker,

The IDE is the Integrated development environment (terminal) built to bypass all the local setup. Obviously it will not connect to your local setup.

Whereas the MongoDB Compass is the MongoDB admin GUI that is designed to speed up you workflow. It is installed on your system, so it will connect to your local MongoDB database.

I hope you got the context.

Thanks,
Kushagra

1 Like

then how we will pass the given examination of MongoDB.provide a path to qualify the given examination

Everything is done in the IDE. Follows the lab instructions and it will work.

1 Like

@Virus_Hacker, any followup on this? If your issue is resolved following one of the post here, please mark that post as the solution. If you resolved you issue yourself, please share the solution and mark your post as the solution. This way others will know they can follow the advises and keep this forum helpful and efficient.

1 Like

4 posts were split to a new topic: Reset work space and Run test options is not Visible

I will extend my previous answer for future uses.

for non-techy learners, and it is very important, “127.0.0.1” belongs to every single pc on earth that have an installed network. it is also named “localhost” and is used to connect a pc back to itself, not somewhere on the internet.

next, have you heard “docker” or “vmware”. they make a virtual machine in some real one. M150 uses a virtual machine (a container) somewhere in the cloud using one of those technologies. and the IDE used in the labs connects to that machine. not your pc, nor Atlas, nor anywhere else.

then, that container opens with a default MongoDB server but it is listening on port 27000, not 27017. for a few lectures, you connect to this container’s server on that port.

then you start editing config files, shut down running servers, and restart them with these new config files. all the commands to do these jobs are provided either in video lectures or in lab notes. please make notes if you are forgetful. and do not forget, all happens in that virtual machine prepared for you somewhere in the cloud.

then you will finish the course, take all the notes and knowledge with you, and apply them to your own local server or cloud services you or your organization uses.