Cannot connect to mongodb errno:61 Connection refused

前端 未结 13 1307
心在旅途
心在旅途 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条回答
  •  猫巷女王i
    2020-12-04 06:09

    I encountered the exact same issue and here is a clear step by step process to avoid this error.

    Step 1 - Installation ( Don't follow this step if you have already installed MongoDB ):

    brew update
    brew install mongodb
    

    Step 2 - Run Mongo Daemon:

    mkdir -p /data/db
    sudo mongod
    

    Step 3 - Run Mongo Shell Interface:

    mongo
    

    In this sequence, I was able to run the mongo command without any error. I have also detailed the error trace and its solution on this blog.

提交回复
热议问题