1. 程式人生 > >Error starting mongod. /var/run/mongodb/mongod.pid exists.

Error starting mongod. /var/run/mongodb/mongod.pid exists.

解決方法:

1、刪除mongod.pid檔案  

    rm -rf /var/run/mongodb/mongod.pid

2、修改/tmp/mongodb-27017.sock檔案許可權

chown mongod:mongod /tmp/mongodb-27017.sock

參考:

https://stackoverflow.com/questions/41678609/mongo-restart-error-var-run-mongodb-mongod-pid-exists