Cannot connect to mongodb errno:61 Connection refused

前端 未结 13 1294
心在旅途
心在旅途 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:11

    I had the same issue and in looking in the log file I saw this:

    {2019-03-09T11:57:32.136-0500 I STORAGE  [initandlisten] 
    exception in initAndListen: NonExistentPath: 
    Data directory /usr/local/var/mongodb not found., terminating}
    

    so I created the directory /usr/local/var/mongodb issued the brew services restart mongodb command I was able to open the mongo console.

提交回复
热议问题