Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
How do I fix the timeout error on the connection between Node app and Mysql?
I am new to deployment. I have created a node droplet which I access successfully with Putty and also a database cluster, which in the mysql workbench works fine, also when I connect it with the code in development so locally works just fine. The problem is that when I access the droplet, clone the project, after npm install and npm start to test it shows me timeout error from the database:
Error: connect ETIMEDOUT at Connection._handleTimeoutError (/root/gmd-server/node_modules/mysql2/lib/connection.js:178:17) at ontimeout (timers.js:482:11) at tryOnTimeout (timers.js:317:5) at Timer.listOnTimeout (timers.js:277:5)
I hope I was clear.
How can I fix it?
Thanks in advance.
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.×