如何为MongoDB编写连接字符串 [英] how to write a connection string for MongoDB

查看:273
本文介绍了如何为MongoDB编写连接字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果credentional如下,任何正文都告诉我如何为MongoDB写一个连接字符串:



数据库名称 - ABC,



服务器名称 - DEF1,DEF2



用户名 - ankur



密码 - ankur123



我创建于My End下面



mongodb:// ankur:ankur123 @ DEF1:27017,DEF2:27017 / ABC?maxpoolsize = 250; authSource = $ external; authMechanism = PLAIN; safe = true

Can Any body tell me how to write a connection string for MongoDB if credentional are as follows:

Database Name - ABC,

Server Name - DEF1,DEF2

UserName - ankur

Password - ankur123

I have Created at My End below

mongodb://ankur:ankur123@DEF1:27017,DEF2:27017/ABC?maxpoolsize=250;authSource=$external;authMechanism=PLAIN;safe=true

推荐答案

external; authMechanism = PLAIN;安全= true
external;authMechanism=PLAIN;safe=true


参考:



http://docs.mongodb.org/manual/reference/connection-string/ [ ^ ]



祝你好运:)
Refer this :

http://docs.mongodb.org/manual/reference/connection-string/[^]

Good luck :)


这篇关于如何为MongoDB编写连接字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆