title: Trouble installing mongodb using Homebrew
body: <p>I'm trying to get Mongo running.</p>
  <p>I installed the package manager <a href="https://brew.sh/" rel="nofollow noreferrer">Homebrew</a></p>
  <p>I then used the commands located on the Mongo site:</p>
  <pre><code>$ brew update
  $ brew install mongodb
  </code></pre>
  <p>This appeared to install correctly.<br />
  I typed <code>mongo</code> in a new terminal window and got the following error:</p>
  <pre><code>MongoDB shell version: 2.0.1
  connecting to: test
  Thu Dec 15 09:37:25 Error: couldn't connect to server 127.0.0.1 shell/mongo.js:84
  exception: connect failed
  </code></pre>
  <p>So I then followed the instructions found on <a href="https://stackoverflow.com/questions/4502531/creating-a-database-in-mongo-cant-connect-get-connect-failed">here</a></p>
  <p>Ran <code>mongod</code> and this is the result:</p>
  <pre><code>mongod --help for help and startup options
  Thu Dec 15 09:38:49 [initandlisten] MongoDB starting : pid=7364 port=27017 dbpath=/data/db/ 64-bit host=Mike-Fieldens-iMac.local
  Thu Dec 15 09:38:49 [initandlisten] db version v2.0.1, pdfile version 4.5
  Thu Dec 15 09:38:49 [initandlisten] git version: 3a5cf0e2134a830d38d2d1aae7e88cac31bdd684
  Thu Dec 15 09:38:49 [initandlisten] build info: Darwin erh2.10gen.cc 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_40
  Thu Dec 15 09:38:49 [initandlisten] options: {}
  Thu Dec 15 09:38:49 [initandlisten] exception in initAndListen: 10296 dbpath (/data/db/) does not exist, terminating
  Thu Dec 15 09:38:49 dbexit: 
  Thu Dec 15 09:38:49 [initandlisten] shutdown: going to close listening sockets...
  Thu Dec 15 09:38:49 [initandlisten] shutdown: going to flush diaglog...
  Thu Dec 15 09:38:49 [initandlisten] shutdown: going to close sockets...
  Thu Dec 15 09:38:49 [initandlisten] shutdown: waiting for fs preallocator...
  Thu Dec 15 09:38:49 [initandlisten] shutdown: lock for final commit...
  Thu Dec 15 09:38:49 [initandlisten] shutdown: final commit...
  Thu Dec 15 09:38:49 [initandlisten] shutdown: closing all files...
  Thu Dec 15 09:38:49 [initandlisten] closeAllFiles() finished
  Thu Dec 15 09:38:49 dbexit: really exiting now
  </code></pre>
  <p>Notice there was an exception with &quot;initAndListen&quot; then it shutdown.</p>
  <p>What am I doing wrong? How can I fix this installation and get Mongo up and running?</p>