Hello. Since I’m very new to this topic of working with MongoDB on a remote Virtual Private Server, things are a bit more complicated than that on my side.
My Node.JS app and MongoDB Community Edition are both on a remote Ubuntu server.
I remember when working with MongoDB on my local Windows 10 machine, I had to activate it with
mongod , first. Only then I could enter the Mongo shell in another PowerShell instance with
A. What if my website’s end users want to add or remove data to and from my in-server database? Will the server keep
mongod command active even if I don’t do that? Is such thing even necessary in this scenario?
This article says I have to use the IP address of my remote server hosting MongoDB when trying to connect to it (from for example a Win10 machine) when using Compass:
I’ve changed the
B. Is this URI string correct for connecting Compass to the remote server db:
mongodb://<IP address of ubuntu server>:27017/?tls=true
I used this URI string in my app when using the MongoDB cluster:
C. Where is the username and password when MongoDB is installed on a remote server? Do I have to create them in Mongo shell on the remote server? If yes, then how?
D. Does creating a user on in-server database change the URI string for Compass? Does it have something to do with
Authentication Method section in Compass?
E. In absence of such user, can Compass access the in-server db directly?
I know that’s a lot. I appreciate your help.