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.

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

mongo -version returns Mongo shell version.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.