Answer a question

I'm trying to connect to an mlab database, but when I run the command

mongodb://ds119508.mlab.com:19508/myDb -u myUser -p myPass

It always prompts this message:

MongoDB shell version v3.4.0 connecting to: mongodb://ds119508.mlab.com:19508/heroku_xnz5tw94 MongoDB server version: 3.2.11 WARNING: shell and server versions do not match

I'd like to get rid of that. I'm sure I've been installing the 3.4 version by using this guide

Thanks in advance for help.

Answers

I have also encountered with this problem. And it was caused by upgrading mongodb without shutting mongo server down.

Now that you've already have the new version of mongodb (tell from the mongo shell version). You can solve it by just restarting the mongod process.

For starting and stopping mongo process, see https://docs.mongodb.com/manual/tutorial/manage-mongodb-processes

Logo

MongoDB社区为您提供最前沿的新闻资讯和知识内容

更多推荐