Right now I have a website hosted and I am using mongodb. I can connect to the database using my credentials, example:
$m = new MongoClient("mongodb://myUserAdmin:abc123@localhost:27017/admin");
When I turn on authentication in my mongodb.conf folder, my website refuses to load and says it cannot connect. However, the mongoclient details are definitely correct. It lets me add and retrieve from the database using the code above, but as soon as I enable auth, it fails for some reason. Anyone have any insight?
Thank you if anyone can help me with this.