Skip to content

MongoDB

Getting started with MongoDB

To use any of the above modules, you need to have a running instance of MongoDB configured for public access from the Internet.

Connect MongoDB to Ibexa Connect

Please select version 2.2.12 in Mongo settings:

61f273b9c7cbe.png

To connect your MongoDB instance to Ibexa Connect, follow the general instructions for Connecting to services. You will be prompted to enter your MongoDB connection string. Please include the username, password, and database in this connection string. If you don't know what it is or how to get it, please look here: https://docs.mongodb.com/manual/reference/connection-string/.

Example connection strings: mongodb://admin:[email protected]/my-database

mongodb://admin:[email protected]:27017,cluster0-shard-00-01-zf4c4.mongodb.net:27017,cluster0-shard-00-02-zf4c4.mongodb.net:27017/test?ssl=true&authSource=admin&replicaSet=Cluster0-shard-0

mongodb://<username>:<password>@cluster0-shard-00-00-yn8nz.mongodb.net:27017,cluster0-shard-00-01-yn8nz.mongodb.net:27017,cluster0-shard-00-02-yn8nz.mongodb.net:27017/test?ssl=true

mongodb://<username>:<password>@cluster0-shard-00-00.n21339.mongodb.net:27017,cluster0-shard-00-01.n21339.mongodb.net:27017,cluster0-shard-00-02.n21339.mongodb.net:27017/Test_DB?ssl=true&replicaSet=atlas-8huh9hu-shard-0&authSource=admin&retryWrites=true&w=majority

After you have filled the 'Connection string' field you can press the Continue button and Ibexa Connect will try to establish a connection to your database. If it succeeds, the dialog will close and you will be able to continue setting up your module.

Ibexa Connect will make connections to your database from its IP addresses. Ensure you whitelist these IPs to allow connections to your MongoDB servers.

Date/time queries

To perform a date/time query, use the ISO 8601 format with milliseconds and no time zone offset. E.g. 2019-05-06T16:19:03.123Z.