Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused

前端 未结 27 2603
孤街浪徒
孤街浪徒 2020-12-12 15:06

while trying this mongo command in ubuntu I am getting this error.

    ritzysystem@ritzysystem-Satellite-L55-A:~$ mongo
    MongoDB shell version: 2.6.1
             


        
27条回答
  •  甜味超标
    2020-12-12 15:23

    For macOS many of the answers are already outdated according to official docs. Somehow the brew has changed and how we should install MongoDB, firstly uninstall it from your macOS (even though it might be not necessary) and then install it using these steps:

    1. brew tap mongodb/brew
    2. brew install mongodb-community@4.4
    3. brew services start mongodb-community@4.4

    Watch out for the 4.4 part, it'll change. If in the future it would break then refer to the official docs and install the version, which is suggested in the linked tutorial.

提交回复
热议问题