title: MongoDB on mLab authentication fails
body: <p>Created a new mLab account and created a database as per the steps here <a href="http://docs.mlab.com/#create-sub" rel="noreferrer">http://docs.mlab.com/#create-sub</a> . Trying to connect to the database using mongo shell and mongoose Node.js module but I see the 'Authentication Failed' errorin both cases. </p>
  
  <p>In Mongo shell the command is, I have double checked the credentials</p>
  
  <pre><code>mongo ds012345.mlab.com:56789/dbname -u dbuser -p dbpassword
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>MongoError: authentication fail
  at Function.MongoError.create (E:\Gatsby\notmongoose\node_modules\mongodb-core\lib\error.js:31:11)
  </code></pre>
  
  <p>Using Mongoose</p>
  
  <pre><code>var mongoose = require('mongoose')
  , Admin = mongoose.mongo.Admin;
  
  var uri = '&lt;correct mongo uri here&gt;';
  
  var connection = mongoose.createConnection(uri,
  {    
  User: '&lt;uname&gt;',
  Password: '&lt;pwd&gt;'
  });
  connection.on('open', function() {
  
  console.log('connection established!!!');
  
  new Admin(connection.db).listDatabases(function(err, result) {
      console.log('listDatabases succeeded');
      console.log(err);
      console.log(result); 
  });
  </code></pre>
  
  <p>});</p>
  
  <p>Error:: MongoConnect Error MongoError:authentication fail</p>
  
  <p>Is there anything else that needs to be done on the mLab console or anything else that I might be doing wrong or missing?</p>