I’ve updated the dbpath in my config file, as well as added the user to the admin db. However, once I am finished doing so, and run the validation script, I get the Mongod was not started by the correct user - remember NOT to run mongod as root.
Is there a way to “sign-in” and run the mongod without using a root user? I had to use sudo mongod --config config.txt
because I got an "IllegalOperation: Attempted to create a lock file on a read-only directory: /var/mongodb/db"
without the sudo before my command.
I’m also unable to shut down the server to restart as it states “there are no users authenticated”, code 13, unauthorized.