0

I have facing issues while running mongo commend after successful installation of mongoDB version 3.6.3. I have run mongo commend and got the following error

MongoDB shell version v3.6.3
    connecting to: mongodb://127.0.0.1:27017
    2018-03-14T18:57:02.928+0530 W NETWORK  [thread1] Failed to connect to 127.0.0.1:27017, in(checking socket for error after poll), reason: Connection refused
    2018-03-14T18:57:02.929+0530 E QUERY    [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
    connect@src/mongo/shell/mongo.js:251:13
    @(connect):1:6
    exception: connect failed
Raj
  • 439
  • 1
  • 8
  • 28

1 Answers1

0

Run into the same problem, my error was that I was this command:

sudo mongo service mongod start

Instead of this:

sudo service mongod start

Make sure you run the second one, hopefully that is your error source as well.

Erindy
  • 155
  • 11