mongoDB can be started, but mongo shell cannot be started?
天蓬老师
天蓬老师 2017-05-02 09:24:25
0
1
675

Run the mongod command to start mongoDB

This should be considered a success, right?

But if you run mongo, the terminal will report this error:

MongoDB shell version: 3.2.7
connecting to: test
2017-01-31T12:56:00.745+0800 W NETWORK  [thread1] Failed to connect to 127.0.0.1:27017, reason: errno:61 Connection refused
2017-01-31T12:56:00.745+0800 E QUERY    [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:229:14
@(connect):1:6

exception: connect failed

I don’t know why~ Please give me some advice, thank you!

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(1)
我想大声告诉你

MongoDB is installed using homebrew?
If yes, launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
then run mongod

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template