'MongoserverError: bad auth: authentication failed problem

I correctly use the username and password in the url of vs code for my server side but in the cmd i find the error of mongodb authentication fail. why this is happening?



Solution 1:[1]

rewrite the uri again and give the username and password again. sometimes connection fails. that's why it happens. hope problem will be solved.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Promi D.