所以我在一个终端窗口中启动MongoD,输出如下:
Fri Oct 26 14:03:15 [initandlisten] MongoDB starting : pid=14618 port=27017 dbpath=/data/db/ 64-bit host=Tim-2.local
Fri Oct 26 14:03:15 [initandlisten]
Fri Oct 26 14:03:15 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
Fri Oct 26 14:03:15 [initandlisten] db version v2.2.0, pdfile version 4.5
Fri Oct 26 14:03:15 [initandlisten] git version: f5e83eae9cfbec7fb7a071321928f00d1b0c5207
Fri Oct 26 14:03:15 [initandlisten] build info: Darwin bs-osx-106-x86-64-1.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_49
Fri Oct 26 14:03:15 [initandlisten] options: {}
Fri Oct 26 14:03:15 [initandlisten] journal dir=/data/db/journal
Fri Oct 26 14:03:15 [initandlisten] recover : no journal files present, no recovery needed
Fri Oct 26 14:03:15 [websvr] admin web console waiting for connections on port 28017
Fri Oct 26 14:03:15 [initandlisten] waiting for connections on port 27017
好像一切正常。然后我打开一个新的终端窗口,并尝试运行Mongo,并收到此错误:
Error: couldn't connect to server 127.0.0.1:27017 src/mongo/shell/mongo.js:91
exception: connect failed
不确定我做错了什么......有人可以帮忙吗?