I have an application (typescript) that is using mongodb as a database. When I try to connect with root user and password,
mongodb://root:<password>@<ip>:<port>/mycollection
I keep getting Authentication Failed. We proceed to create an user (we will be calling it mongouser) that only can access mycollection. It successfully connect! I tried removing the collection from the URL and try to connect with root again but without any success.
So the question is: why root can't connect but mongouser can?
On MongoDBCompass, I can connect to the database with root without any problems.