【发布时间】:2023-12-31 04:06:01
【问题描述】:
我已经在我的 Mac OSX Sierra 10.12.6 上安装了带有 brew 的 mongodb:
brew install mongodb
运行时没有错误:
brew services start mongodb
但是当我尝试运行时:
mongo
我收到以下错误:
MongoDB shell version v3.6.2
connecting to: mongodb://127.0.0.1:27017
2018-02-05T14:55:25.952-0500 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2018-02-05T14:55:25.952-0500 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:251:13
@(connect):1:6
exception: connect failed
我已经删除了 .plist 文件,确保 /data/db 在那里并且所有必要的权限都在上面。我可以毫无问题地启动mongodb,一切都运行,但我无法让它与brew services start mongodb一起运行
有什么想法吗?
【问题讨论】: