Skip to content

Toro Cloud Dev Center

Connecting to MongoDB Atlas

MongoDB Atlas is a database as a service (DBaaS) platform designed to fully manage MongoDB databases in the cloud. It is capable of deploying to different cloud platforms such as AWS, Azure, or GCP. It also provides security, clustering, high-availability, fault tolerance, scaling, and other features designed for development and production use.

The steps below guide you on how to connect to MongoDB Atlas.

  1. On the Clusters page in MongoDB Atlas, click CONNECT on the cluster you want to connect to. Connecting to cluster
  2. You may need to whitelist TORO Cloud's public IP addresses if you are running on TORO Cloud. Create a user (if you do not already have one), then click "Choose a connection method" when finished. Configuring connection security
  3. Select Connect Your Application. Choosing a connection method
  4. Select Java as the driver. Choose "4.1 or later" as the version. Copy the connection string. Retrieving the connection string
  5. Paste the connection string in Martini. Remove the credentials on the connection string and input them on the Username and Password fields instead.

    Configuring the database connection
    Configuring the database connection

  6. Click Test Configuration. Martini will show a dialog telling you whether it managed to establish a connection to the MongoDB cluster.

Wait for deployment

Adding a firewall rule, user, or other changes on your cluster's settings may trigger a deployment to propagate the changes. During this point, it may take a minute for the settings to take effect.