title: mongodb Network is unreachable on mac
body: <p>Sorry I have ask the same question again from <a href="https://stackoverflow.com/questions/45450712/robo-3t-error-network-is-unreachable">Robo 3T Error : Network is unreachable</a></p>
  
  <p>Beacause I really can't find out the file <code>/etc/mongod.conf</code>.</p>
  
  <p>My machine is <code>mac</code> and use <code>homebrew</code> install <code>mongodb</code>.</p>
  
  <p>There is no <code>mongod.conf</code> in my path <code>/usr/local/var/mongodb</code>.</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>According suggestion the path <code>/usr/local/opt/mongodb/mongod.conf</code>
  <a href="https://i.stack.imgur.com/cK3LH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cK3LH.png" alt="enter image description here"></a></p>
  
  <p>My <code>/usr/local/opt</code> like this:
  <a href="https://i.stack.imgur.com/7O2Bk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7O2Bk.png" alt="enter image description here"></a></p>
  
  <p>Try <code>brew uninstall mongo</code> and <code>brew install mongo</code>.
  Connect it still get the same error.</p>
  
  <p>But find the file <code>mongod.conf</code> in the path <code>/usr/local/etc</code>.</p>
  
  <p>I try to remove the file and restart mongodb server then type command <code>mongo</code> get the error:</p>
  
  <pre><code>MongoDB shell version v4.0.2
  connecting to: mongodb://127.0.0.1:27017
  2018-09-18T14:38:21.241+0800 E QUERY    [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
  connect@src/mongo/shell/mongo.js:257:13
  @(connect):1:6
  exception: connect failed
  </code></pre>
  
  <p>It is so strange...:(</p>