I tried to create a new connection with Studio 3T for Mongo DB. I don't have a previous DB connection and this is the new one that I am trying to create it. I can't able to figure out why this is happening.
When tried to do so, I got an error stating:
Error Details :
Database error (MongoSecurityException): Exception authenticating
MongoCredential{mechanism=SCRAM-SHA-256,
userName='{{my_db_username}}', source='admin', password=,
mechanismProperties={}}.
This is StackTrace:
Stacktrace: |_/ Database error (MongoSecurityException): Exception
authenticating MongoCredential{mechanism=SCRAM-SHA-256,
userName='sociofyDB_rifaye', source='admin', password=,
mechanismProperties={}} |____/ Mongo Server error
(MongoCommandException): Command failed with error 18
(AuthenticationFailed): 'Authentication failed.' on server
localhost:27017. |____… |____… The full response is: |____… {|____… "ok" : 0.0,
|____… "errmsg" : "Authentication failed.",
|____… "code" : NumberInt(18),
|____… "codeName" : "AuthenticationFailed"
|____… }
EDIT: I see this error majorly when I try to provide the authentications. This does not occur when I connect normally without the authentication(username/pwd).
Best Answer
As per MongoDB articles blog here The Connection Manager in Studio 3T makes it easy to connect to MongoDB, whether it is cloud-hosted or on-premise, or through a direct connection or a replica set.
Create a new connection
Studio 3T
supports various settings nested under the Server, Authentication, SSL, SSH Tunnel, and Advanced tabs:Server
Authentication
SSL
SSH Tunnel - Use SSH tunnel to connect
Advanced
As I am able to see from attached screen shot as Studio 3T is showing the TRIAL License. Instead of
Studio 3T
IDE you can use theRobo 3T
(formerlyRobomongo
) is the free lightweight GUI for MongoDB.For example the simple new connection of Robo 3T (Robomongo) will be as follows:
For further your ref here , here and here