MongoDB Advanced Connection Strings

Version:
Current
Last modified: November 19, 2020

For Controller and Gallery persistence you can use advanced connection strings to connect to MongoDB. Use advanced connection strings if you require support for these:

  • TLS/SSL
  • Replica Sets
  • Sharding
  • MongoDB Atlas

If you were using replica sets before the availability of the connection string option (2020.1 release), you have to change to a connection string.

Connection String Tips and Examples

  • Supported connection string parameters are driver dependent. Parameters have to be supported by all below-listed supported drivers to be used in a connection string. Supported driver versions include...
    • c 1.15 (mongoc)
    • c++ 3.4.1 (mongocss)
    • c# 2.7.2 (mongoc#)
  • Special characters in usernames, passwords, or parameter values have to be URL encoded.

See the MongoDB Connection String documentation for help formatting your connection string.

Controller Persistence Examples

On-premise, single-node example with SSL/TLS:

mongodb://username:P%40ssw0rd@hostname.domain.tld:27017/AlteryxService?authSource=databasename&ssl=true

On-premise, replica set, example with SSL/TLS:

mongodb://username:P%40ssw0rd@host01.domain.tld:27017,host02.domain.tld:27017,host03.domain.tld:27017/AlteryxService?authSource=databasename&replicaSet=rs0&ssl=true

Atlas example:

mongodb+srv://username:P%40ssw0rd@host-0-1mngx.mongodb.net/AlteryxService?retryWrites=true&w=majority

Web Persistence Examples

On-premise, single-node example with SSL/TLS:

mongodb://username:P%40ssw0rd@hostname.domain.tld:27017/AlteryxGallery?authSource=databasename&ssl=true

On-premise, replica set, example with SSL/TLS:

mongodb://username:P%40ssw0rd@host01.domain.tld:27017,host02.domain.tld:27017,host03.domain.tld:27017/AlteryxGallery?authSource=databasename&replicaSet=rs0&ssl=true

Atlas example:

mongodb+srv://username:P%40ssw0rd@host-0-1mngx.mongodb.net/AlteryxGallery?retryWrites=true&w=majority

Search Persistence Examples

On-premise, single-node example with SSL/TLS:

mongodb://username:P%40ssw0rd@hostname.domain.tld:27017/AlteryxGallery_Lucene?authSource=databasename&ssl=true

On-premise, replica set, example with SSL/TLS:

mongodb://username:P%40ssw0rd@host01.domain.tld:27017,host02.domain.tld:27017,host03.domain.tld:27017/AlteryxGallery_Lucene?authSource=databasename&replicaSet=rs0&ssl=true

Atlas example:

mongodb+srv://username:P%40ssw0rd@host-0-1mngx.mongodb.net/AlteryxGallery_Lucene?retryWrites=true&w=majority

Was This Helpful?

Running into problems or issues with your Alteryx product? Visit the Alteryx Community or contact support.