Closed ilkcantnriverdi closed 3 years ago
Once your connection is broken, you just create a new one to replace it. This module provides the createConnection method to create new connections to your Mysql server.
Depending on your application, it may be easier and more advantageous to use a connection pool instead of trying to write your own connection management code.
Thank you for your interest. I am already using creatPool. My problem is that when the connection with the server is lost, the program closes and does not wait to connect again.I have to solve this problem.
Hello, when the connection is lost, I want to reconnect instead of closing the program. When I run this code I get this error. How can I write the reconnection code?