MongoDB Compass connect ECONNREFUSED 127.0.0.1:27017

Naiim Khaskhoussi picture Naiim Khaskhoussi · Dec 17, 2019 · Viewed 7.7k times · Source

The default localhost connection refused.

  • Operating System: Windows 7
  • MongoDB Compass: Version 1.19.12

screenshot

Answer

Mayantha Fernando picture Mayantha Fernando · Oct 22, 2020

This message shows that your mongo is disconnected. Therefore you should open your cmd (Windows) Then type `mongod and press Enter key. After a few minutes, mongo will be connected. Then connect through your MongoDB Compass