MongoDB Shell和服务器不匹配 [英] MongoDB shell and server do not match
问题描述
我正在尝试连接到mlab数据库,但是当我运行命令时
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
它总是提示此消息:
MongoDB Shell版本v3.4.0连接到: mongodb://ds119508.mlab.com:19508/heroku_xnz5tw94 MongoDB服务器 版本:3.2.11警告:外壳和服务器版本不匹配
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
预先感谢您的帮助.
推荐答案
我也遇到了此问题.这是由于升级mongodb而没有关闭mongo服务器导致的.
I have also encountered with this problem. And it was caused by upgrading mongodb without shutting mongo server down.
现在您已经拥有mongodb的新版本(从mongo shell版本中得知).您可以通过重新启动mongod
进程来解决它.
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.
有关启动和停止mongo进程的信息,请参见 https://docs.mongodb. com/manual/tutorial/manage-mongodb-processes
For starting and stopping mongo process, see https://docs.mongodb.com/manual/tutorial/manage-mongodb-processes
这篇关于MongoDB Shell和服务器不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!