Is there any way to dynamically create a new database in mongo using the 3.x Java driver along with adding a user with defined roles to it?
-
I don't think its supported through java drivers. You should use mongo shell for this purpose.s7vr– s7vr2016-12-16 18:26:54 +00:00Commented Dec 16, 2016 at 18:26
-
I have read in few answers that it could be lazily created but those were using DBObjectMahesh Nathwani– Mahesh Nathwani2016-12-17 09:46:12 +00:00Commented Dec 17, 2016 at 9:46
-
Please add examples and I'll be happy to help you convert them to 3 xs7vr– s7vr2016-12-17 11:42:52 +00:00Commented Dec 17, 2016 at 11:42
-
stackoverflow.com/a/26952982/5829549 check thisMahesh Nathwani– Mahesh Nathwani2016-12-18 21:41:01 +00:00Commented Dec 18, 2016 at 21:41
Add a comment
|