mongodb无法启动?

D:\projects\myblog>mongo

MongoDB shell version v3.4.4

connecting to: mongodb://127.0.0.1:27017

2017-05-14T23:17:25.098+0800 W NETWORK  [thread1] Failed to connect to 127.0.0.1:27017 after 5000ms milliseconds, giving up.

2017-05-14T23:17:25.099+0800 E QUERY    [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :

connect@src/mongo/shell/mongo.js:237:13

@(connect):1:6

exception: connect failed


森栏
浏览 932回答 2
2回答

慕后森

D:\Program Files\MongoDB\Server\3.4\bin>mongod2017-05-14T23:43:59.949+0800 I CONTROL  [initandlisten] MongoDB starting : pid=14884 port=27017 dbpath=D:\data\db\ 64-bit host=DESKTOP-EALT52P2017-05-14T23:43:59.950+0800 I CONTROL  [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R22017-05-14T23:43:59.950+0800 I CONTROL  [initandlisten] db version v3.4.42017-05-14T23:43:59.951+0800 I CONTROL  [initandlisten] git version: 888390515874a9debd1b6c5d36559ca86b44babd2017-05-14T23:43:59.951+0800 I CONTROL  [initandlisten] OpenSSL version: OpenSSL 1.0.1u-fips  22 Sep 20162017-05-14T23:43:59.951+0800 I CONTROL  [initandlisten] allocator: tcmalloc2017-05-14T23:43:59.951+0800 I CONTROL  [initandlisten] modules: none2017-05-14T23:43:59.951+0800 I CONTROL  [initandlisten] build environment:2017-05-14T23:43:59.951+0800 I CONTROL  [initandlisten]     distmod: 2008plus-ssl2017-05-14T23:43:59.951+0800 I CONTROL  [initandlisten]     distarch: x86_642017-05-14T23:43:59.951+0800 I CONTROL  [initandlisten]     target_arch: x86_642017-05-14T23:43:59.951+0800 I CONTROL  [initandlisten] options: {}2017-05-14T23:43:59.951+0800 I STORAGE  [initandlisten] exception in initAndListen: 29 Data directory D:\data\db\ not found., terminating2017-05-14T23:43:59.951+0800 I NETWORK  [initandlisten] shutdown: going to close listening sockets...2017-05-14T23:43:59.951+0800 I NETWORK  [initandlisten] shutdown: going to flush diaglog...2017-05-14T23:43:59.951+0800 I CONTROL  [initandlisten] now exiting2017-05-14T23:43:59.951+0800 I CONTROL  [initandlisten] shutting down with code:100

侃侃尔雅

mongo服务器没有启动,先输入mongod启动服务器,才能mongo连接并进行后续操作
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

MongoDB