Hai , I have some problem with my script connection maven to mlab server , when i compiled build my code i got error like this = " com.mongodb.MongoCommandException: Command failed with error 18: 'Authentication failed.' on server ds161059.mlab.com:61059. The full response is { "ok" : 0.0, "errmsg" : "Authentication failed.", "code" : 18, "codeName" : "AuthenticationFailed" } "
This is my code to connected it
public MongoConnector(String host, long port, String username, String password) { String textUri = "mongodb://"+username+":"+password+"@"+host+":"+port; MongoClientURI uri = new MongoClientURI(textUri); this.mongoClient = new MongoClient(uri); }
No responses yet.