当我尝试在终端中运行 Mongod 时,我收到了以下消息:
2015-05-14T17:33:04.554+0700 I STORAGE [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating
2015-05-14T17:33:04.554+0700 I CONTROL [initandlisten] dbexit: rc: 100
并运行 mongo 命令:
MongoDB shell version: 3.0.3
connecting to: test
2015-05-14T17:34:26.679+0700 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2015-05-14T17:34:26.681+0700 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed
at connect (src/mongo/shell/mongo.js:179:14)
at (connect):1:6 at src/mongo/shell/mongo.js:179
exception: connect failed
我曾尝试更改/var/lib/mongodb 和/var/log/mongodb 中的权限,但仍然不起作用,我尝试再次卸载并安装mongodb,但仍然存在相同的问题。任何人都可以帮忙吗?谢谢
我正在使用 Ubuntu 14.04 LTS 64 位