URI demo

mongodb://[username]:[password]@[host]:[port]/[dbname]?authMechanism=SCRAM-SHA-1&authSource=admin

authSource=admin mongoDb认证,要在uri中体现!

你可能感兴趣的:(URI demo)