title: MongoDB database not connectiing
body: <p>When i am trying to connect to my mongodb database with the given script it gives me error that the ip address might be not present there i have added that ip address so  it so i choose option from allow all ip address it is also giving error</p>
  <pre><code>const express = require('express');
  const mongoose = require('mongoose');
  
  
  const app = express();
  
  
  const uri = &quot;mongodb+srv://sarang:&lt;pasword####&gt;@maindatabase.zxgjd.mongodb.net/maindatabase?retryWrites=true&amp;w=majority&quot;;
  
  
  
  
  const PORT = 7000;
  console.log(&quot;The server is preparing to run&quot;)
  mongoose.connect(uri).then(()=&gt;{
      app.listen(PORT,()=&gt;{
          console.log(`Server is running on ${PORT}`)
      })
  }).catch(error =&gt;{
      console.log(error.message)
  })
  </code></pre>
  <p>and  the error is</p>
  <p>The server is preparing to run</p>
  <pre><code>Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://docs.atlas.mongodb.com/security-whitelist/
  </code></pre>
  <p><a href="https://i.stack.imgur.com/ruQEp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ruQEp.png" alt="enter image description here" /></a></p>