Trying to set up MongoDB for my Node.JS application. I running this command:
mongo \"mongodb+srv://cluster0-gjc2u.mongodb.net/test\" --username
So you have to take care of 2 things.
1) First off, having mongodb in your $PATH, create a .bash_profile under the home folder if you don't have it already, then insert the following.(For Ubuntu)
export PATH="$PATH:
/usr/bin/mongo" Make sure you place the location of mongo on your computer. If you don't know the location, typewhereis mongoon the terminal. After saving, typesource ~/.bashrcin the terminal.
2) Lastly, copy the connect link from the mongodb atlas, and when asked for username and password
please provide the credentials set to access the database not the mongdb atlas account.