mongodbrobo3t

Authentication failed on admin database with just-created credentials


I'm trying to set up authorization on MongoDB server, but following different guides brings me to the same error :

"Authentication failed"

The account has been added successfully to Users table on Admin database, but once I set "authorization: enabled" I cannot connect to neither 127.0.0.1 nor localhost with the credentials I've specified above. Admin database connection return "Authentication failed" error with password specified and "Failed to load list of databases" without authentication settings specified.

What may be the reason for this? Google results mostly suggest updating MongoDB shell, but mine is the latest (3.4.10).


Solution

  • The problem magically fixed itself by creating the user for around 5th time via console. I see no changes to the methods I used, meaning it's most likely mongodb's fault or even my installation's. The question will be closed, but the answer as to why this happened still remains open for me.