I have written a Node.Js Application for demo purpose to connect to DB. I ma new to DO platform and connecting remote servers. The Node.Js application that I have written, I am able to connect to MySQL DB (present/using Managed DB Cluster provided by DO.) The logic is same, connection string details different. But, that same Node.Js application is unable to establish a connection to the MySQL present on the same ubuntu machine. I have taken a LEMP stack on Ubuntu. On, the LEMP stack ubuntu machine. I have PhpMyAdmin also which is working fine. In addition to LEMP, I have Node installed on the same Ubuntu Virtual Machine. This Node.Js application is unable to establish a connection to the MySQL which is a part of LEMP on this Ubuntu machine. But, the node.js application is able to establish connection to MySQL Managed DB Cluster.
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!