MongoDBを行う上で新しくなっています。今日は初めてです。それ以前はMongoDBが他の誰かによって設定されていますので、ここでいくつかの助けが必要です。WindowsのMongo DBの接続エラー
私はモンゴを開始しようと、これは誤りです:
C:\MongoDB>mongo
MongoDB shell version: 3.2.12
connecting to: test
2017-05-05T17:36:18.459+0800 W NETWORK [thread1] Failed to connect to
127.0.0.1
:27017 after 5000ms milliseconds, giving up.
2017-05-05T17:36:18.459+0800 E QUERY [thread1] Error: couldn't connect to
server 127.0.0.1:27017, connection attempt failed :
[email protected]/mongo/shell/mongo.js:229:[email protected](connect):1:6
exception: connect failed
私もmongod.exeを開始しようとしたときにエラーが発生しました。それが相互リンクかどうかわからない。
C:\MongoDB>mongod.exe
2017-05-05T17:52:42.543+0800 I CONTROL [initandlisten] MongoDB starting :
pid=2
1708 port=27017 dbpath=C:\data\db\ 64-bit host=xxxx
2017-05-05T17:52:42.544+0800 I CONTROL [initandlisten] targetMinOS: Windows
7/Windows Server 2008 R2
2017-05-05T17:52:42.545+0800 I CONTROL [initandlisten] db version v3.2.12
2017-05-05T17:52:42.545+0800 I CONTROL [initandlisten] git version:
ef3e1bc78e997f0d9f22f45aeb1d8e3b6ac14a14
2017-05-05T17:52:42.545+0800 I CONTROL [initandlisten] OpenSSL version:
OpenSSL1.0.1u-fips 22 Sep 2016
2017-05-05T17:52:42.546+0800 I CONTROL [initandlisten] allocator: tcmalloc
2017-05-05T17:52:42.546+0800 I CONTROL [initandlisten] modules: none
2017-05-05T17:52:42.546+0800 I CONTROL [initandlisten] build environment:
2017-05-05T17:52:42.546+0800 I CONTROL [initandlisten] distmod:
2008plus-ssl
2017-05-05T17:52:42.547+0800 I CONTROL [initandlisten] distarch: x86_64
2017-05-05T17:52:42.547+0800 I CONTROL [initandlisten] target_arch:
x86_64
2017-05-05T17:52:42.547+0800 I CONTROL [initandlisten] options: {}
2017-05-05T17:52:42.548+0800 I STORAGE [initandlisten] exception in
initAndListen: 29 Data directory C:\data\db\ not found., terminating
2017-05-05T17:52:42.548+0800 I CONTROL [initandlisten] dbexit: rc: 100
私はそのデータの\ DBはCで作成されますが、ちょうどされていません見ました:configファイル.IN \は、書かれたパスがすでに存在しています。デフォルトでは
systemLog:
path: D:\MongoDB\mongod.log
storage:
dbPath: D:\mongod\data\db
ターミナルで管理者として実行できますか? –
はい、管理者として実行しました – Kaycee