xxxxxxxxxx
mongo is not recognized as internal or external command
or
mongosh is not recognized as internal or external command
// first check by running "mongosh"
if it doesn't work then please also install mongodb shell and follow the below steps
If you are using mongodb version >=6 then
1). then add C-> Program Files -> mongodb -> server -> bin (Copy the link/address)
add it to enviromental variables (press win -> type env (press enter) -> System properties windows appears
-> go to advance -> press Enviromental variables -> in system varaible section click path twice ->
click new -> paste the link there -> press ok)
2). after downloading the mongo shell -> install it in c drive and then open the folder -> then open
mongosh folder -> if there is bin folder than open it and copy the link (otherwise just copy the link/address)
add it to enviromental variables (press win -> type env (press enter) -> System properties windows appears
-> go to advance -> press Enviromental variables -> in system varaible section click path twice ->
click new -> paste the link there -> press ok -> press ok)
now you are good to go hope it will work now.
0
xxxxxxxxxx
You need to run mongod first in one cmd window then open another and type mongo. Make sure you updated your Windows Path environment variable too so that you don't have to navigate to the directory you have all of the mongo binaries in to start the application. To update the Path variable:
Go to Control Panel > System & Security > System > Advanced System Settings > Environment Variables > navigate to the Path variable hit Edit and add ;C:\mongodb to the Path (or whatever the directory name is where MongoDB is located (the semi-colon delimits each directory).
you can check out this video: https://www.youtube.com/watch?v=oC6sKlhz0OE&ab_channel=CSCORNERSunitaRai
xxxxxxxxxx
mongo is not recognized as internal or external command
or
mongosh is not recognized as internal or external command
// first check by running "mongosh"
if it doesn't work then please also install mongodb shell and follow the below steps
If you are using mongodb version >=6 then
1). then add C-> Program Files -> mongodb -> server -> bin (Copy the link/address)
add it to enviromental variables (press win -> type env (press enter) -> System properties windows appears
-> go to advance -> press Enviromental variables -> in system varaible section click path twice ->
click new -> paste the link there -> press ok)
2). after downloading the mongo shell -> install it in c drive and then open the folder -> then open
mongosh folder -> if there is bin folder than open it and copy the link (otherwise just copy the link/address)
add it to enviromental variables (press win -> type env (press enter) -> System properties windows appears
-> go to advance -> press Enviromental variables -> in system varaible section click path twice ->
click new -> paste the link there -> press ok -> press ok)
now you are good to go hope it will work now.
xxxxxxxxxx
/* After version 6.0.0 mongosh does not get installed automatically
so you have to manually install mongosh
https://www.mongodb.com/try/download/shell
then run mongosh --version to see if it got installed.
/*