I am trying to test MongoDB and I have it all downloaded and moved into the root folder. I can navigate to the folder that holds the mongod, but when I try to run it by typi
3 steps:
Step 1:
export PATH="$PATH:/usr/local/mongodb/bin"
OR
export PATH="$PATH:/usr/local/opt/mongodb@3.2/bin"
(replace version number with your local version)
The first step will allow you to run the command, but will get you another error: "/data/db does not exit" so you have to
Step 2 :
sudo mkdir -p /data/db
Now /data/db is read only, but it has to be writable also so
Step 3 :
sudo chown -R USERNAME /data/db