when i am running mongo -version
it showing a different version than when i am running db.version()
from Mongo shell. how this is possible and which is the correct version.
-
So what do they say exactly? How do you access the Mongo shell?– gronostajSep 12, 2019 at 7:28
-
this is the out put of db.version() 3.2.20 and below mongo -version MongoDB shell version: 2.6.12– Sharma_AbhinavSep 12, 2019 at 7:32
-
i am accessing mongo shell from terminal by running mongo command– Sharma_AbhinavSep 12, 2019 at 7:34
Add a comment
|
1 Answer
mongo -version
returns Mongo shell version.
db.version()
returns version of the server you're connected to.