ODBC Driver for MongoDB

Installing on Linux (RPM) - ODBC Driver for MongoDB


ODBC Driver for MongoDB works under control of an ODBC driver manager. ODBC driver manager is not distributed along with our driver and must be installed separately.

ODBC Driver for MongoDB is compatible with UnixODBC driver manager.

In case when using other ODBC driver managers, ODBC Driver for MongoDB will be installed, but it will require manual modification of configuration files of these managers.


Let's consider how to install the Devart ODBC driver on Linux from an RPM package, for example, on CentOS. To install the driver, you should download the .rpm package and install it via the command line. See the detailed description of these steps below:

  1. Download the RPM package from the Devart website.

    By default the required package will be downloaded into the ~/Downloads folder (or the selected one);

  2. Run the 'Konsole' program;
  3. Navigate to the folder with the downloaded package cd ~/Downloads (if you downloaded the package into another folder, you need to specify the path to this folder as the cd command parameter):
    cd ~/Downloads/

  4. Use the following command to install the devart-odbc-mongo.i386.rpm on a 32-bit system:
    sudo rpm -ivh devart-odbc-mongo.i386.rpm

    Use the following command to install the devart-odbc-mongo.x86_64.rpm on a 64-bit system:
    sudo rpm -ivh devart-odbc-mongo.x86_64.rpm

  5. Driver is installed successfully.

To activate the driver, perform the steps described in the Product Activation article.

Test connection

After the driver is installed, a DSN with the name DEVART_MONGODB is created. You can use it to test connection with MONGODB server. For this, perform the following steps:

  1. Open the odbc.ini file located in the /etc folder. Find the DEVART_MONGODB section and specify the required connection settings:
    Server=<your MongoDB server address>
    Port=<your MongoDB Port>
    Database=<your MongoDB database name>
    Client Library=libmongoc-1.0.so.0
    BSON Library=libbson-1.0.so.0
  2. Run the UnixODBC Test Command utility and test a connection using the following command:
    isql -v DEVART_MONGODB 

Installing MongoDB client libraries

ODBC Driver for MongoDB requires libmongoc and libbson client libraries to be installed on the PC. The driver dynamically loads client libraries (by default, libmongoc-1.0.so.0 and libbson-1.0.so.0) available in the user system. If you do not have these libraries installed, you can use ones distributed with the driver.

After the driver is installed, four libraries will be copied to the driver installation folder:

The installer automatically detects the bitness of an operating system and creates the symlinks libmongoc-1.0.so.0 and libbson-1.0.so.0 for 32-bit or for 64-bit libraries correspondingly.

See also:

© 2015-2021 Devart. All Rights Reserved. Request Support ODBC Forum Provide Feedback