Navigation

Install MongoDB Connector for BI

Note

The MongoDB Connector for BI and associated utilities are compatible only with MongoDB server version 3.2 or greater.

To set up MongoDB Connector for BI with a business intelligence tool such as Tableau, follow the steps on this page.

Supported Platforms

BI Connector supports PPC64LE systems running Red Hat Enterprise Linux 7.1+; s390x systems running Red Hat Enterprise Linux 7.2+; and the following 32- and 64-bit operating systems:

Red Hat Enterprise Linux/CentOS (64-bit) 6.2 or later 7.0 or later
Debian (64-bit) 7.1 or later (“Wheezy”) 8.1 or later (“Jessie”)
Ubuntu (64-bit) 14.04 (“Trusty”)  
SUSE Enterprise Linux (64-bit) 11 12
macOS (64-bit) 10.10 or later  
Windows (32- and 64-bit) Windows 7 or later Windows Server 2008 R2 or later

Prerequisites

Install OpenSSL on your host.

macOS

Install Homebrew and then install OpenSSL.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"; brew update && brew install openssl

RHEL-based Linux

Ensure that your system has its OpenSSL package installed.

rpm -qa | grep -i openssl

If it is not, use your package manager to install it.

Debian-based Linux

Ensure that your system has its OpenSSL package installed.

dpkg -l | grep -i openssl

If it is not, use your package manager to install it.

Windows

BI Connector for Windows bundles the OpenSSL libraries.

Install the BI Connector

1

Install the MongoDB Connector for BI.

Download the BI Connector for your operating system from the MongoDB Download Center.

RHEL-based Linux

  1. Uninstall the previous version, if you have installed it.

    sudo yum remove mongodb-bi*
    
  2. Extract the .tar archive you downloaded.

    tar -xvzf mongodb-bi-linux-{arch}-{platform}-{version}.tgz
    
  3. Install the programs within the bin/ directory into a directory listed in your system PATH.

    sudo install -m755 bin/mongo* /usr/bin/
    

Debian-based Linux

  1. Uninstall the previous version, if you have installed it.

    sudo apt-get remove mongodb-bi*
    
  2. Extract the .tar archive you downloaded.

    tar -xvzf mongodb-bi-linux-{arch}-{platform}-{version}.tgz
    
  3. Install the programs within the bin/ directory into a directory listed in your system PATH.

    sudo install -m755 bin/mongo* /usr/local/bin/
    

macOS

  1. Extract the .tar archive you downloaded.

    tar -xvzf mongodb-bi-osx-x86_64-{version}.tgz
    
  2. Install the programs within the bin/ directory into a directory listed in your system PATH. If a prior version exists, overwrite the binaries.

    sudo install -m755 bin/mongo* /usr/local/bin/
    

Windows

  1. Run the .msi file you downloaded.
  2. Follow the wizard to install the files. The binaries install into a bin directory inside the installation directory.
2

Generate your schema definition file.

Provide a MongoDB server hostname, replace dbname with the name of your database, and optionally replace collname with the name of a collection. If you do not specify a collection, mongodrdl will generate a schema from all collections in dbname.

Linux / macOS (authentication not enabled)

mongodrdl --host {your.mongohost.com} \
          --db dbname \
          [--collection collname] \
          --out schema.drdl

Linux / macOS (authentication enabled)

mongodrdl --host {your.mongohost.com} \
          --db dbname \
          [--collection collname] \
          --out schema.drdl \
          --username {username} \
          --password {password} \
          --authenticationDatabase {dbname}

Windows (authentication not enabled)

"C:\Program Files\MongoDB\Connector for BI\{version}\bin\mongodrdl.exe" --host {your.mongohost.com} `
            --db dbname `
            [--collection collname] `
            --out schema.drdl

Windows (authentication enabled)

"C:\Program Files\MongoDB\Connector for BI\{version}\bin\mongodrdl.exe" --host {your.mongohost.com} `
            --db dbname `
            [--collection collname] `
            --out schema.drdl  `
            --username {username} `
            --password {password} `
            --authenticationDatabase {dbname}

Note

The --host option only accepts a hostname. You cannot provide a MongoDB connection string.

You can examine the generated schema.drdl file in a text editor and remove any fields or tables that are not part of your intended schema.

See also

mongodrdl

3

Edit your BI Connector Configuration file.

Using your preferred text editor, create a mongosqld.conf file. To review the configuration file options, see Configuration File.

4

Start mongosqld as a system service using a configuration file.

Note

All the file paths in your configuration file must be absolute.

RHEL 6.x / CentOS 6.x, Debian 7.x (Wheezy), and SUSE 11

mongosqld install --config {pathToConfigFile}/mongosqld.conf
service mongosql start

To enable the service so it starts automatically at boot time, run the following:

chkconfig mongosql on

RHEL 7.x / CentOS 7.x, Debian 8.1 (Jessie), Ubuntu 14.04 (Trusty), and SUSE 12

mongosqld install --config {pathToConfigFile}/mongosqld.conf
systemctl start mongosql.service

To enable the service so it starts automatically at boot time, run the following:

systemctl enable mongosql.service

macOS

mongosqld install --config {pathToConfigFile}/mongosqld.conf
launchctl load -w /Library/LaunchDaemons/mongosql.plist

Windows

"C:\Program Files\MongoDB\Connector for BI\2.2\bin\mongosqld.exe" install --config {pathToConfigFile}\mongosqld.conf
net start mongosql

Windows returns mongosql service installed if your installation succeeded.

5

Install the Authentication Plugin

If using authentication without SSL, install the C Authentication Plugin as described in Install the C Authentication Plugin.

6

Connect to the BI Connector

Launch your business intelligence tool, and connect to the BI Connector using a MySQL driver and the following settings:

Host The hostname of the server on which you installed the BI Connector.
Port 3307 by default.

For more details on connecting to the BI Connector, see Using the MongoDB Connector for BI.

Change the Schema File

If you need to use a different schema and database:

  1. Stop the mongosql service.
  2. Edit the schema.path setting in your configuration file.
  3. Save the configuration file.
  4. Start the mongosql service.