Cannot connect to mongodb errno:61 Connection refused

前端 未结 13 1261
心在旅途
心在旅途 2020-12-04 05:38

I recently installed mongodb-2.6.0 with Homebrew. After successfully installed, I tried to connect using the mongo command. I am receiving the following errors

相关标签:
13条回答
  • 2020-12-04 06:30

    It can happen when the mongodb service is not running on the mac. To start it, I tried

    brew services start mongodb
    

    and it worked.

    Edit: According to the discussion on this PR on homebrew: https://github.com/Homebrew/homebrew/issues/30628

    brew services is deprecated, I looked around on SO and found these answers now answer the question: What is the correct way to start a mongod service on linux / OS X?

    0 讨论(0)
提交回复
热议问题