i have to try creating connection class using java to connect with mongoDB database, everything seems okay, but i always get authenticate error message
this the error line
boolean auth = db.authenticate("aku", "kamu".toCharArray());
i have to try creating connection class using java to connect with mongoDB database, everything seems okay, but i always get authenticate error message
this the error line
boolean auth = db.authenticate("aku", "kamu".toCharArray());
Please check whether you are using MongoDB 2.X or 3.X driver.
The API DB.authenticate(String username, char[] passwd)
is no longer exists in 3.X driver. Please see http://mongodb.github.io/mongo-java-driver/3.2/driver/reference/connecting/authenticating/ on how to authenticate with the 3.X driver.