【mongoDB】 Failed to unlink socket file /tmp/mongodb-27017.sock Permission denied

./mongod --dbpath /Users/yyyyy/mongodb/db[db文件夹的路径]

 E  NETWORK  [initandlisten] Failed to unlink socket file /tmp/mongodb-27017.sock Permission denied

解决方法:

sudo rm /tmp/mongodb-27017.sock

出现一个填写密码的提示 填完密码以后再执行 

./mongod --dbpath /Users/yyyyy/mongodb/db[db文件夹的路径]

成功

找到

2020-05-04T20:30:28.509+0800 I  NETWORK  [listener] Listening on 127.0.0.1

2020-05-04T20:30:28.509+0800 I  NETWORK  [listener] waiting for connections on port 27017

在浏览器输入 

127.0.0.1:27017

显示

It looks like you are trying to access MongoDB over HTTP on the native driver port.

则这一步执行成功

 

你可能感兴趣的:(问题解决,mongodb)