mongo - couldn't connect to server 127.0.0.1:27017

后端 未结 30 2435
故里飘歌
故里飘歌 2020-11-27 09:43

I am coming from riak and redis where I never had an issue with this services starting, or to interact.

This is a pervasive problem with mongo and am rather clueless

30条回答
  •  孤街浪徒
    2020-11-27 10:43

    I had same problem to connect mongodb after install using brew on macOS.

    The problem was also mongod.lock but before i had mongodb 3.6 installed and database directory was /usr/local/var/mongodb and it have old files and mongod.lock

    Simple i moved my old database files to different folder and removed everything from /usr/local/var/mongodb

    Then restarted :

    brew services restart mongodb
    

    And it's working fine now.

提交回复
热议问题