## 三.以授权的方式启动Mongo,给使用的数据库添加用户 1.切换数据库 use test 2.创建用户 db.createUser({user: "root", pwd: "123456", roles: \[{ role: "dbOwner", db: "test" }\]}) 参考博客:https://www.cnblogs.com/jacksoft/p/6916137.html ## 二. mongodb-driver-sync 驱动集成用法 > https://blog.csdn.net/nyzzht123/article/details/107936552 https://www.jianshu.com/p/5186fb5a1292