MongoDB shell and server do not match

2019-01-23 14:48发布

问题:

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

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

it always prompt 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 the help

回答1:

I've 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 stoping mongo process, see https://docs.mongodb.com/manual/tutorial/manage-mongodb-processes



标签: mongodb