MongoDB shell and server do not match

I try to connect to the mlab database, but when I run the command

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

This message always prompts:

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

I would like to get rid of this. I'm sure I installed version 3.4 using this guide

Thank you in advance.

+19
mongodb
source share
2 answers

I also ran into this problem. And this was caused by updating mongodb without shutting down the mongo server.

Now that you already have a new version of mongodb (tell us by version of the mongo shell). You can solve this problem by simply restarting the mongod process.

To start and stop the Mongo process, see https://docs.mongodb.com/manual/tutorial/manage-mongodb-processes

+12
source share

There are probably several versions of mongodb installed on your computer. I had a similar problem (I uninstalled the old version, but not completely) and I followed this link ( https://medium.com/@rajanmaharjan/uninstall-mongodb-macos-completely-d2a6d6c163f9 ) to remove all versions of mongodb and reinstall the latest version and it worked.

0
source share

All Articles