title: What's a clean way to stop mongod on Mac OS X?
body: <p>i'm running mongo 1.8.2 and trying to see how to cleanly shut it down on Mac.</p>
  
  <p>on our ubuntu servers i can shutdown mongo cleanly from the mongo shell with:</p>
  
  <pre><code>&gt; use admin
  &gt; db.shutdownServer()
  </code></pre>
  
  <p>but on my Mac, it does not kill the mongod process.  the output shows that it 'should be' shutdown but when i ps -ef | grep mongo it shows me an active process.  also, i can still open a mongo shell and query my dbs like it was never shutdown.</p>
  
  <p>the output from my db.shutdownServer() locally is:</p>
  
  <pre><code>MongoDB shell version: 1.8.2
  connecting to: test
  &gt; use admin                  
  switched to db admin
  &gt; db.shutdownServer()
  Tue Dec 13 11:44:21 DBClientCursor::init call() failed
  Tue Dec 13 11:44:21 query failed : admin.$cmd { shutdown: 1.0 } to: 127.0.0.1
  server should be down...
  Tue Dec 13 11:44:21 trying reconnect to 127.0.0.1
  Tue Dec 13 11:44:21 reconnect 127.0.0.1 failed couldn't connect to server 127.0.0.1
  Tue Dec 13 11:44:21 Error: error doing query: unknown shell/collection.js:150
  </code></pre>
  
  <p>i know i can just kill the process but i'd like to do it more cleanly.</p>