I am using the same connection string on local and production. When the connection string is mongodb://localhost/mydb
mongodb://localhost/mydb
What is the username and password?
For MongoDB earlier than 2.6, the command to add a root user is addUser (e.g.)
addUser
db.addUser({user:'admin',pwd:'',roles:["root"]})