Hi community,
I installed the mongo-server community edition and mongosh on a linux-vm (ubuntu 20.04) with an IP-4 let’s say 1:2:3:4
No replicas at the moment.
Now I want to read and write data from my local PC with php.
My questions are:
There is the linux mongodb user without any password. Should I set one ?
Handle the user rights on linux or mongosh level ?
ConnString "mongdb://mongodb:my_new_password@1:2:3:4 plus mongod-Port ?
If not Atlas I don’t add “srv” in the ConnString, right ?
More securing: Yes, I know, there is a way to go
For developing purposes user and password would be enough but how is the ConnString ?
Depending on how you install MongoDB, by default the mongod process binds only to localhost so it’s not accessible through the network. On top of that, even if you enable auth on the MongoDB server, without any user defined in the server, the localhost exception is active and you can connect to it locally. The exception will be disabled once you create a user on the server.