【发布时间】:2022-02-12 01:17:13
【问题描述】:
Ubuntu 16.04
在终端上运行mongo 的控制台输出:
MongoDB shell version v3.6.3
connecting to: mongodb://127.0.0.1:27017
2018-03-27T18:23:41.006+0530 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
2018-03-27T18:23:41.006+0530 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
【问题讨论】:
-
尝试使用端口号 mongo --port 27020
-
你运行
mondodb服务器了吗?
标签: mongodb