I have installed MongoDb, on WSL using the steps from the official docs here.
When i issue the commandsudo service mongod start
i get the following messagemongod: unrecognized service
.
I've tried troubleshooting using these stackoverflow answers. I got it starting using one of the commands sudo mongod --fork -f /etc/mongod.conf
However I cannot stop mongod using sudo service mongod stop
. In fact mongod keeps running even after i close WSL. Is the documentation wrong? Or am i doing something wrong?Why wont the commands listed in the docs work?
If I keep using the above command to start mongodb will it affect the data that i store?