node.js - Mongodb authentication error Ubuntu -


i setting mongodb parse server.

mongodb shell version: 3.2.12

here following steps use setup mongodb.

mongo > use mydbname > db.createuser({ user: "mydbuser", pwd: "mydbpwd", roles: [ { role: "admin", db: "mydbname" } ] }) 

import db

mongorestore ~/backup/mydbname --db=mydbname --username=mydbuser --password=mydbpwd 

run npm

 npm install  npm start 

till here works absolutely fine.

but after time or after 1 day throws error: authentication failed. error

please fix issue.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -