node.js - NodeJS - MongoClient.Connect with URL to DB Other Than Default -
i'd use mongoclient.connect(url) option connecting node , in fact work authenticated connections admin database. however, if try specify different database "auth fails" code 18.
i think means credentials setup on admin database and, unfortunately, can't change arrangement (for now, anyway).
it seems url syntax direction driver heading, i'd use if possible. there way use syntax, authenticate , connect admin database, , connection 1 of other databases on server?
i found out how this: use instance ("admin") open database have access to:
db2 = db.db("name of other name");
see hidden inside the documentation
Comments
Post a Comment