This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I am using authentication database mechanism in MongoDB. In the Mongo DB Input tool of Alteryx I see no option where I can specify the authentication database. Does Alteryx support authentication database mechanism while accessing the MongoDB database?
The MongoDB tool connects to a server, not to a specific DB. The User should be authenticated to the Database that they are created on, however they may have roles set up on other DB's on the same server. When you enter the User/Pass in the MongoDB tool, the server should authenticate the user, rather than an individual DB.
I am getting an authentication failed error any time I attempt to read from or write to any database that is not the database I authenticate to. I triple checked my roles, and so far the only way I have been able to resolve this error is to create a new identical user in each database. Please let me know your thoughts. Thank you in advance!
I'm possibly not the best person for this, a year ago I found myself doing a fair bit with Mongo and so the answers were fresh.
From your question, I'm guessing that you are not talking about the Alteryx Server MongoDB, but rather another Mongo Server. I think that you should be able to set roles on the other DB's on the Server, however the User should only need to authenticate to one DB per server. There is some funny things that can happen by memory if the user is not on an admin DB...
Try having a look at the results of db.getroles() to see the access for the user.
I'm having the same issue. The response marked as a "solution" is not a solution, and I'm wondering if one exists. If you use an authentication database in Mongo, you have to specify the database to use to authenticate (typically the "admin" database), and data is in some other database. The connector seems to assume that the database you connect to is also the authentication database. So as another user noted, the only work around seems to be to add authentication data to every database you want to connect to. The connector should prompt for two databases: the authentication database and the "data" database. For reference, take a look at Mongo's own connection GUI within Compass. The database/collection for the actual data is specified elsewhere.