title: MongoError: cannot do queries on admin in atlas
body: <p>I just set up a free MongoDB on Atlas. I added a database called 'react-project' that I'm trying to connect to using mongoose. Here is my connection string:</p>
  
  <pre><code>mongoose.connect('mongodb+srv://myUser:myPassword@myCluster.mongodb.net/react-project');
  </code></pre>
  
  <p>As you can see, at the end of the query I specify the database I want to connect to. I can connect to the mongodb instance just fine, but when I try and do an operation (such as Model.find()), I get the following MongoError:</p>
  
  <pre><code>MongoError: cannot do raw queries on admin in atlas
  </code></pre>
  
  <p>This leads me to believe that it is not connecting to the 'react-project' database, but is connecting to the 'admin' database instead.</p>
  
  <p>Why is this happening and how can I connect to the correct database?</p>
  
  <p>Here is the code I'm running that is giving me the error:</p>
  
  <pre><code>var productSchema = mongoose.Schema({
      productId: Number,
      img: String,
      price: Number,
      title: String,
      type: String
  });
  
  var Product = mongoose.model('Product', productSchema);
  
  // Return all products
  Product.find(function(error,result) {
      if (error) return console.error(error);
      console.log(result);
  });
  </code></pre>