title: How to delete a database using node.js and MongoDB Atlas?
body: <p>I'm new to MongoDB and node.js and I want to know how to delete a database.
  I've searched for and I found that it is done with the <code>dropDatabase()</code> method. The problem is that it shows a <code>MongoError:  user is not allowed to do action [dropDatabase] on [test.]</code>. I also searched for this error and the answer I found is that the user needs to be registered as <code>Data Access Read Write</code>. However, my user in  mongo atlas is registred as <code>Project Owner</code> and as the answer says. I removed <code>Project Owner</code> and it still displays the error.</p>
  
  <pre><code>MongoClient.connect(uri, { useNewUrlParser: true }, (err, client)=&gt;{
      if(err) throw err;
      console.log("Connected...");
      const db = client.db("test");
      db.dropDatabase();
      console.log("asdfghj")
      client.close();
  });
  </code></pre>
  
  <p>In fact, whenever i searched to fix the problem typing <code>Mongo atlas</code> in the search bar, the results are like <code>How to delete cluster in mongo atlas</code> even though i'm typing <code>delete database in mongo atlas</code>. So i don't know if a database can be deleted in mongo atlas.
  Thank you in advance.</p>