发布于 4 个月前 作者 hfqf 700 次浏览 来自 问答

hfqf:~ points$ sudo mongod --config /usr/local/etc/mongod.conf Password: Abort trap: 6 hfqf:~ points$ mongo MongoDB shell version v3.4.9 connecting to: mongodb:// 2017-09-20T22:56:49.087+0800 W NETWORK [thread1] Failed to connect to, in(checking socket for error after poll), reason: Connection refused 2017-09-20T22:56:49.088+0800 E QUERY [thread1] Error: couldn’t connect to server, connection attempt failed : connect@src/mongo/shell/mongo.js:237:13 @(connect):1:6 exception: connect failed hfqf:~ points$

1 回复

都什么年代了,docker 大法好 一条命令解决

docker run -d -p 27017:27017 --name=mongodb mongo --storageEngine wiredTiger