couldn't connect to server 127.0.0.1 shell/mongo.js

前端 未结 13 2098
后悔当初
后悔当初 2020-11-29 19:07

when i setup mongodb in my ubuntu , i try : ./mongo it show this error :

 couldn\'t connect to server 127.0.0.1 shell/mongo.js

so what can

13条回答
  •  天命终不由人
    2020-11-29 19:25

    Either your mongod is not running (check using "ps" command) or it is listening on some outside IP address and not on localhost. So first check the process list if 'mongod' is running. If yes, check with "netstat -nap" for the related port.

    Of course you can start mongod on the console manually or even look into the mongod logfile (if there is one configured...depending on how you installed mongod).

提交回复
热议问题