I’m trying to connect my app to MongoDB using MONGO_URL: in MUP. The database is on an independent VPS. The VPS is behind a firewall and is connected to the app VPS via a private network. If I don’t secure the database with a username and password I can get it to connect however if I create a user to allow readWrite commands to add security it wont connect. I get this error.
MongoError: failed to connect to server [private-network-ip:27017]
If I log into the database and use show dbs this is what appears:
Not too much info to go on but if I had to guess I’d say mongo was not accesable on the public ip OR the user/password combination does not have appropriate access privileges for the database you are trying to connect to. You may have to specify the authentication database in the url