I am trying to work through exercises in Mongodb university. One of the issues I came across is that when I use mongosh it always gives me an Syntax error, please see below:
@Timur_Akhmadulin Hey, If you are doing some exercise from MongoDB University you must have seen the complete connection string in the previous lecture(s). By adding the complete string you can connect your system to their server.
For example the connection string for basic course is as followed:
If you still have some confusing you can share the course link so that we can send you the connection string (if you are connecting your system to their server)
@Timur_Akhmadulin make sure that you have set the MongoDB environmental variable in your system. if you are trying it from local system (using command line)
is typical to the mongo shell javascript interpreter.
Most likely scenario, he did a first mongo -nodb or mongosh --nodb and then try to start mongod at the mongo or mongosh prompt. He has to exit the current javascript interpreter and return to the bash interpreter from the in browser IDE.
It is specific to the M103 course and it is best to have this discussion over there.
Thank you for the suggestion. I already tried. Before I set up environmental variable the mognosh would just disappear after I try to start it. Not it does not, but the errors are the same.