MongoDB ODBC - Auth Failed

Discussion of open issues, suggestions and bugs regarding usage of ODBC Drivers
Post Reply
ceurraca
Posts: 2
Joined: Thu 14 Dec 2017 21:06

MongoDB ODBC - Auth Failed

Post by ceurraca » Thu 14 Dec 2017 21:10

Do you know why when I try to connect to setup a MongoDB ODBC get this error

[Devart][ODBC][MongoDB]auth failed

I am able to connect to the MongoDB through CMD, it's a remote MongoDB database.

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: MongoDB ODBC - Auth Failed

Post by azyk » Mon 18 Dec 2017 11:35

The mentioned issue may occur if the driver loads not Devart client libraries (from the distribution), but some others. For example, such libraries can be in the paths of the PATH system variable.

To solve the issue, run C:\Windows\System32\odbcad32.exe . This is a 64-bit version of ODBC Administrator. Create a new User DSN. Specify the credentials, and in the Client library field, specify C:\Program Files (x86)\Devart\ODBC\MongoDB\Win64\libmongoc-1.0.dll and in the BSON library C:\Program Files (x86)\Devart\ODBC\MongoDB\Win64\libbson-1.0.dll . Click Test Connection. Please report the result.

Then run C:\Windows\syswow64\odbcad32.exe . This is a 32-bit version of the ODBC Administrator. Create a new User DSN. Specify the credentials, and in the Client library field, specify C:\Program Files (x86)\Devart\ODBC\MongoDB\Win32\libmongoc-1.0.dll and in the BSON library C:\Program Files (x86)\Devart\ODBC\MongoDB\Win32\libbson-1.0.dll . Click Test Connection. Report the result.

Note: you can download the latest version of our driver on our website:
https://www.devart.com/odbc/mongodb/download.html

Post Reply