Install MongoDB BI Connector in Ubuntu


MongoDB BI Connector is a connector that allows you to use MongoDB as a data source for SQL-based BI (Business Intelligence) and visualization tools. It allows you to connect your BI tools, such as Tableau, to a MongoDB database and use SQL to query and visualize the data stored in the database. The BI Connector translates SQL queries into MongoDB queries and returns the results in a format that can be easily consumed by the BI tool. This enables you to use the power of SQL to analyze and visualize data stored in a MongoDB database, without having to learn the MongoDB query language. In this post, we will learn to install the MongoDB BI connector in Ubuntu.


  1. MongoDB installed and Running
  2. User must have role read/write if auth is enabled in MongoDB
  3. Install MySQL ODBC Driver. (It Requires) 

Steps to install MongoDB BI Connector in Ubuntu

Choose the version of you OS

2. Extract the recently downloaded file


tar -xvzf mongodb-bi-linux_<your version of os and other info>.tgz

3. Go to the recently extracted directory


cd mongodb-bi-linux_*

4. Install MongoDB BI Connector

To install this connector use the following script:

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

5. Copy Data from MongoDB

mongodrdl --host -d mydatabase -o /opdirectory/schema-<mydatabase>.drdl

6. Start mongosqld for testing

mongosqld --schema /opdirectory/schema.drdl --mongo-uri

7. Install MySQL Client to work smoothly.

sudo apt install mysql-client-core-5.7

8. Start mongosqld for Prod with configuration

  1. Save config file in /etc/mongosqld.conf
  2. Config file sample
  quiet: false
  logAppend: false
  path: "/var/log/mongosqld/mongosqld.log"
  verbosity: 1
  logRotate: "rename" # "rename"|"reopen"
  enabled: true
#  datasource: "datasource_name"
    uri: ""
      username: "mongodb_username"
      password: "mongodb_password"
  port: 3307
#  ssl:
#    mode: "allowSSL"
#    PEMKeyFile: "/vagrant/certificates/mongosqld-server.pem"
#    CAFile: "/vagrant/certificates/ca.crt"
  path: "/etc/mongosqld/schema/"
    name: mongosqld
    displayName: mongosqld
    description: "BI Connector SQL proxy server"

9. Install mongosqld as a service with the above configuration

sudo mongosqld install --config /etc/mongosqld.conf

Note: You may not be able to install or start the service if the directory for log is not created already. We have to create it manually. Like: sudo mkdir logdir

10. Enable mongosqld service and your service will auto start when the system reboot

sudo systemctl enable mongosqld.service

11. Start mongosqld service if you want

sudo systemctl start mongosqld.service


By following the above steps we are successful to install MongoDB BI connector in Ubuntu server.

Leave a Reply

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x