title: upgrade mongodb
body: <p>I'm looking for the easiest and the most recommended way to upgrade mongodb version (standalone server and mongodb shell).</p>
  
  <p>Are there any terminal (for mac) commands that i can follow in order to upgrade?</p>
  
  <p>I tried to stop the server by 
  $ mongo </p>
  
  <blockquote>
    <p>use admin
    db.shutdownServer()<br>
    i get : 
    Sat Mar 17 20:38:15 DBClientCursor::init call() failed
    Sat Mar 17 20:38:15 query failed : admin.$cmd { shutdown: 1.0 } to: 127.0.0.1:27017
    server should be down...
    Sat Mar 17 20:38:15 trying reconnect to 127.0.0.1:27017
    Sat Mar 17 20:38:15 reconnect 127.0.0.1:27017 failed couldn't connect to server 127.0.0.1:27017</p>
  </blockquote>
  
  <p>I understand that after stopping the server i need to change the bin folder of mongodb. (which i'm failing to do because mongo is in use)</p>
  
  <p>If someone knows an easier way to only upgrade the mongodb version i would really thank him/her!
  thank you.</p>