Questions tagged «mongodb-3.4»

2
如何在mongodb连接uri上分别指定身份验证数据库和目标数据库?
我使用这个连接URI来连接到MongoDB的:mongodb://user:password@localhost/admin。它将admin用作机器人身份验证和目标数据库。如何使uri admin用作身份验证,但允许我连接到其他数据库?请以下面的命令为例: mongo --host localhost -u user -p password --authentication admin test 上面的命令将用作admin身份验证数据库,但连接到test数据库。如何在uri上做同样的事情?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.