Connecting to MongoDB® Cluster with ScaleGrid
Once you've created a new Scalegrid for MongoDB® cluster through the ScaleGrid console, you must connect it to your deployment. Follow these steps to connect your cluster:
Prerequisites
Network Connectivity
Network connection works
Skip to the next step if you've already configured your network settings
Ensure that your network settings allow the client machine to connect to port 27017 on instances of the MongoDB® cluster by setting up the following:
- If your cluster is open to the Internet, ensure that your client is whitelisted either under the Cluster Firewall Settings or under the Account Firewall Settings on the ScaleGrid console. Whether your cluster is open to the Internet depends on the Cloud Profile settings.
- If your cluster is NOT open to the Internet, then the network settings need to be determined from the cloud provider's VPC and Security Group settings. Refer to your cloud provider's documentation to find out the correct configuration required to ensure connectivity.
Create a User
To connect to your cluster, you must first create a new user, as it is highly recommended not to use the admin user created with your cluster. Follow these steps to create a new user for your MongoDB® cluster:
Connecting to Your Database
There are various ways to connect to your database. Click on the one you wish to proceed with:
Updated about 1 month ago