hi Developer,
On my system am trying to add connection in mongodb compass, but showing this kind of error, due any one have solution for it.

hi Developer,
On my system am trying to add connection in mongodb compass, but showing this kind of error, due any one have solution for it.

Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amira BedhiafiRank #601 · 4K reputationPosted Aug 3, 2025, 1:18 PM EDT
Hello Ajay !
MongoDB Compass is trying to connect to ayour local MongoDB server on port 27017, but the connection is being refused. It is either your MongoDB service is not running or not listening on the expected port.
You can run this command in your terminal:
or on Windows :
The error messages also includes
::1:27017(IPv6 loopback), which means that Compass is trying both IPv4 and IPv6. If MongoDB is not configured to listen on::1, it may fail. You can disable IPv6 for testing or verify if MongoDB is listening on both by setting this in your config file (mongod.conf):