I can run the script in the specific database like
mongo main myscript.js<br/>
where main is a database name. The same thing I am unable to run inside the script like
myscript.js
use main; // not taking, throw error when using "mongo myscript.js"