0

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.

3
  • So what do they say exactly? How do you access the Mongo shell?
    – gronostaj
    Sep 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 Sep 12, 2019 at 7:32
  • i am accessing mongo shell from terminal by running mongo command Sep 12, 2019 at 7:34

1 Answer 1

0

mongo -version returns Mongo shell version.

db.version() returns version of the server you're connected to.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .