title: Mongodb authentication error Ubuntu
body: <p>I am setting up mongodb for parse server.</p>
  
  <p>MongoDB shell version: 3.2.12</p>
  
  <p>Here are following steps i use to setup mongodb.</p>
  
  <pre><code>mongo
  &gt; use mydbname
  &gt; db.createUser({ user: "mydbuser", pwd: "mydbpwd", roles: [ { role: "admin", db: "mydbname" } ] })
  </code></pre>
  
  <p><strong>Import db</strong></p>
  
  <pre><code>mongorestore ~/backup/mydbname --db=mydbname --username=mydbuser --password=mydbpwd
  </code></pre>
  
  <p><strong>Run NPM</strong></p>
  
  <pre><code> npm install
   npm start
  </code></pre>
  
  <p>Till here it works absolutely fine. </p>
  
  <p>But after some time or after 1 day it throws <strong>Error: Authentication failed.</strong> error</p>
  
  <p>Please help to fix this issue.</p>