title: mongodb: Auth mechanism not specified
body: <p>I followed the instructions here for <a href="https://medium.com/@matteocontrini/how-to-setup-auth-in-mongodb-3-0-properly-86b60aeef7e8" rel="nofollow noreferrer">setting up users</a>...</p>
  
  <p>Then from another machine I do:</p>
  
  <p><code>mongo -u admin -p adminpassword host/collection</code></p>
  
  <p>The response I get is:</p>
  
  <blockquote>
    <p>MongoDB shell version: 2.6.10 connecting to: host/collection
    2019-07-12T06:20:36.336+0000 Error: 2 { ok: 0.0, errmsg: "Auth
    mechanism not specified", code: 2, codeName: "BadValue" } at
    src/mongo/shell/db.js:1287 exception: login failed</p>
  </blockquote>
  
  <p>Now, I suppose this is an issue with different versions but what I'm really after is to remote connect from a node script and that's failing as well but the only message is: "MongoError: Authentication failed."</p>
  
  <p>Does anyone know a solution?</p>