我第一次在OSX上创建基本Web应用程序。Mongodb连接失败(连接被拒绝)
我已经安装了MongoDB,我可以在终端上使用'mongo'命令,但是我无法进入mongodb shell。
SOE-SOE01492:evnt humadshah$ mongo
MongoDB shell version v3.4.6
connecting to: mongodb://127.0.0.1:27017
2017-07-13T13:29:20.917+0500 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2017-07-13T13:29:20.917+0500 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
[email protected]/mongo/shell/mongo.js:237:13
@(connect):1:6
exception: connect failed
我完全不知道是什么原因造成的。我以前从未在Windows上遇到此错误。
你能提供蒙戈配置文件的内容是什么? 它应该位于/usr/local/etc/mongod.conf –
在目录中似乎没有任何东西...... –
你能告诉我你是如何在你的mac上安装mongo的?你用过自制软件吗? –