使用MognoDB connector for BI時,如果MongoDB段加了auth認證,在Client端的連接字串該如何寫?
-
使用MognoDB connector for BI時,如果MongoDB段加了auth認證,在Client端的連接字串該如何寫?
-
mongodb://username:password@host:port/db
-
@22265 感謝回覆,但我要的是MognoDB connector for BI的連接字串!!
-
[Connecting to the MongoDB Connector for BI — MongoDB Connector for BI 2.0](https://docs.mongodb.com/bi-connector/master/tutorial/connecting/#client-authentication)
For example, to authenticate as the user
grace
with authentication mechanismPLAIN
and using an external source, you would use the following username:grace?mechanism=PLAIN&source=$external
-
問了官方,使用MognoDB connector for BI,如果Mongod啟用auth,則必須也使用SSL/TLS才行
Thanks for reaching out to MongoDB Support regarding the BI Connector configuration. Based on the information provided, it appears the
mongod
is running with--auth
enabled and the BI components need support that option.In order to support auth, the
mongosqld
requires both sides of the connection (mongod
andmysql
) to be SSL/TLS enabled.mysql --enable-cleartext-plugin --protocol tcp --host ip --port 3307 -u 'account?mechanism=SCRAM-SHA-1&source=openfire2' --ssl-ca=/path_to_the_CAcert/ca.crt -p