how to run a Mongo db script on a remote server?
I know below command can be used for the same on local as mentioned here:How to execute mongo commands through shell scripts?
mongo < yourFile.js
I want to run this script on a remote server
mongodb:uri:mongodb://user:[email protected]:27017/mydb
With Mongo on local machine :
mongo -u <user> -p <password> mongodb01d.mydomain.com:27017/mydb <yourFile.js>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With