How to find mongodb connection string in Google cloud Compute Engine VM Instance (Bitnami)

Viewed 2480

I have used mLab previously with below connection string. Now I am hosting my app in Google App Engine with my mongodb instance on Google Compute Engine using Bitnami. When I create a instance, I couldn't find the connection string.

mLab connection string: mongodb://username:password@ds129010.mlab.com:29010/testdn

But know the username and password. what could be the connection string

what could be the connection string for Bitnami GCP Compute Engine VM instance.

username: root, password: test

1 Answers

The External IP of the instance is the host for the mongodb to connect. The connection string would be

mongodb://username:password@<IP-of-the-instance>:27017/testcdn

NOTE:- Don't forget to open port 27017 from the VPC networks to access from outside the Compute Engine Instance like from your personal laptop

PFA the image depicting where to find the IP How to get External IP of an instance

Related