Skip to main content

MongoDB Connection Guide

Service Management

After creating the database, you will be redirected to the App Management page.

App Management

On this page, you can:

  • Enable or disable your service
  • View how to connect to the database service
  • Customize the database configuration

Connection Information

Click on the Connection Method option in the Basic Settings tab.

Connection Method

On this page, you will see the following information:

  • Internal Endpoint: The internal address of your database
  • Port: The internal port of the database, which is 27017 by default
  • User: The database username that has been automatically assigned
  • Password: The database password that has been set automatically or manually
info

If you want to connect to the database from platforms other than the container (like your personal computer), click on the Create External Port option. Then use the External Endpoint as the hostname and the External Port instead of 27017.

Connection Methods

Using MongoDB Compass

  1. First, download and install MongoDB Compass.
  2. Run the application and click on Add new connection.
  3. Click on the Advanced Connection Options at the bottom of the page.
  4. In the General tab:
    • Host: External database host with external port
  5. In the Authentication tab:
    • User Name: Database username
    • Password: Database password
  6. Click on the Save & Connect option.

on Different Operating Systems

Install and Connect Using mongosh
  1. Install the mongosh package:
choco install mongodb
  1. Connect to the database:
mongosh kubarcloud.net:port
tip
  • MongoDB uses the TCP protocol for connection.
  • Before connecting, ensure that your system's firewalls allow connections to the specified port.