I have a Function (nodejs) that is independent from the App Platform and I’m trying to connect to a managed database (mysql). The error I am getting is: “Database query failed: Error: connect ETIMEDOUT”.
I have successfully tested the function code locally, verified many times that the connection params for local and my function are exactly the same, removed trusted sources so that my database is open to the public…not sure what else I can do.
I have googled extensively and looked around DO community support and have come up with nothing aside from one or two related questions, one of which says you can’t connect to a managed database from a function that is independent from app platform, and another that was able to somehow add the IP of their function to the trusted sources of their managed database.
Is what I’m trying to do impossible?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hello there,
Standalone function should be able to connect to Manged database. However it does not work if trusted source are enabled. From your question, I see that you have disabled trusted sources and it still does not work. We can check internally and see if there is any problem since trusted source was enabled earlier. Could you please create ticket in your DO account at https://cloud.digitalocean.com/account/support?
Thank you, Swarn suvarna.