Same problem as MongoError: connect ECONNREFUSED 127.0.0.1:27017 but for Mac users.
Asked
Active
Viewed 83 times
2 Answers
0
I also configured the same error just now. What I found was that you have to install MongoDB as a service, this option can be seen when mongoDB in installed. There are 2 options run mongoDB as a service or run mongoDB as a Local server we have to pick option 1 and things will get configured automatically.

Akshit Tomar
- 1
- 2
-1
This is the required command on Mac for starting a mongodb server if you installed through homebrew, which is the reccomended installation route on Mongodb's documentation.
brew services start mongodb/brew/mongodb-community
Hope this prevented someone from the pain of having to scroll through 20 wrong answers on the other page.

Stuckinsidejake
- 7
- 2
-
Not installed via brew. Is there any another solutions? – kvk30 Nov 14 '22 at 08:40