title: Error: queryTxt ETIMEOUT when connecting to MongoDb Atlas using mongoose
body: <p>Im trying to connect my mongoose with my MongoDB Atlas Cluster. It currently has no database or anything but whenever I try:</p>
  
  <pre><code>mongoose.connect( uri || 'mongodb://localhost/test',options)
  .then(()=&gt;{
      console.log("Connected to the Database. Yayzow!");
  })
  .catch(err =&gt; {
      console.log(err);
  });
  </code></pre>
  
  <p>I get this message:</p>
  
  <pre><code>Error: queryTxt ETIMEOUT cluster0-ghis2.mongodb.net
  at QueryReqWrap.onresolve [as oncomplete] (dns.js:202:19) {
  errno: 'ETIMEOUT',
    code: 'ETIMEOUT',
    syscall: 'queryTxt',
    hostname: 'cluster0-ghis2.mongodb.net'
  }
  </code></pre>
  
  <p>My dependencies:</p>
  
  <pre><code>  "dependencies": {
      "express": "^4.17.1",
      "mongodb": "^3.5.7",
      "mongoose": "^5.9.14"
    }
  </code></pre>
  
  <p>I've whitelisted all IPs as off now (0.0.0.0/0). Also I've made sure my firewall is disconnected and so is my anti-virus. I made my friend check it out too and it did work for him but not me</p>
  
  <p>Any help is appreciated!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Solved the error by changing my DNS to Google's Public DNS!
  If anyone get this error just make sure to change your DNS.
  Throwing a link for the same <a href="https://www.youtube.com/watch?v=F9u5ULrRt3Y" rel="noreferrer">here</a></p>