Pymongo keeps refusing the connection at 27017

前端 未结 9 769
灰色年华
灰色年华 2020-11-29 04:23

I am trying to run a simple connection to pymongo but it keeps returning that the connection was refused

Here is what I tried:

>>>from pymon         


        
9条回答
  •  野性不改
    2020-11-29 04:50

    Removing mongod.lock inside /var/lib/mongodb

    sudo rm /var/lib/mongodb/mongod.lock
    

    And then restarting the service should do it. For example, in my Ubuntu installation, restarting the server is something like this:

    sudo service mongodb start
    

提交回复
热议问题