After migrating my old MacBook Pro to a new machine via the Migration Assistant, I am unable to connect to MongoDB.
I re-installed it via Homebrew, and when I run:
brew services start mongodb-community
Terminal states that the service started, however, when I run: mongo
I get this error:
MongoDB shell version v3.4.9
connecting to: mongodb://127.0.0.1:27017
2020-04-09T09:20:02.419-0400 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2020-04-09T09:20:02.419-0400 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:237:13
I was following this guide on Medium: https://medium.com/better-programming/installing-mongodb-on-macos-catalina-aab1cbe0c836
to re-install MongoDB. Can anyone help me out?
Best Answer
Did you reinstall
brew
after migration? I had lots of problems after upgrade to Catalina. However on fresh Catalina (andbrew
default installation) I:brew tap mongodb/brew
brew install mongodb-community
brew services start mongodb-community
==> Successfully started
mongodb-community`You can try to:
cellar
folder andbrew cache
brew tap mongodb/brew
or full brew reinstall and follow 1-4.