The default localhost connection refused.
- Operating System: Windows 7
- MongoDB Compass: Version 1.19.12
Join Stack Overflow to learn, share knowledge, and build your career.
The default localhost connection refused.
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
must you need to run MongoDB server on local? for that, you need to:
run a command on the command prompt. open command prompt goes to a file location like C:\Program Files\MongoDB\Server\4.4\bin
.
type mongod
and press Enter key.
After a few minutes, mongo will be connected. then add path variable to the environment.
Type services in start. open it. search for mongodb there. start/restart the mongodb from services.
sudo service mongod status
, however, I believe this won't work in windows, but I'm sure there's something equivalent in the docs – Lucas Abbade Dec 17 '19 at 13:27