虚拟机中装了ubuntu,装mongo有一段时间,突然发现连不上,报错: MongoDB shell version: 2.6.1 connecting to: test 2014-06-26T15:31:07.940+0800 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused 2014-06-26T15:31:07.941+0800 Error: couldn’t connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146 exception: connect failed
然后我查到可以这样启动: sudo mongod --smallfiles
但是我关掉虚拟机,它还是要打一次命令,什么情况