Yesterday I ran into this problem: http://stackoverflow.com/questions/30822370/authentication-always-failing-when-connecting-to-mongodb
I was confident I did everything right, but alas, had no luck. The MongoDB instance I was using in this case was an instance of MongoDB set up from the single-click-install app for Ubuntu 14.04.
After having no luck, I decided to install the MeanStack single click application. It worked out of the box so I figured I could just dissect it, see what it was doing, and what I was doing wrong. To my surprise though, I couldn’t find what I was doing wrong at all in terms of how I had set up my database query. I just popped in my own app, completely replacing the MEAN app provided with my own, and it worked perfectly with that MongoDB instance.
So this leaves the instance of MongoDB as the only difference. Something about the MongoDB set up with the “MongoDB” app, meant a query that would work in the Mean Stack" app didn’t work there. Surely, I must have missed something I was supposed to do in the MongoDB app that prevented any of my authentication-related queries from working.
So what are the differences between the two instances of MongoDB which would cause one to work while the other didn’t? (In this case, the MEAN stack app allowed me to plugin and go straight away, while the MongoDB app didn’t…)
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!