Having trouble connecting to Mongo DB from hosting server

please check your database server’s network access settings. it is possible you have strict IP access allowing only your local machine’s IP.