-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node 17.4, MySQL Server 8.0, Mac OS Monterey, ECONNREFUSED with error code -61, ::1:3306 #2547
Comments
Hi, Guys. JS:
Get the following error trace:
After agonizing for a while, I couldn't understand the ::1:3306 part of the error message. Changed 'localhost' in the connection object to 127.0.0.1 and it worked. This is with node.js 17.4 Downgraded node.js to 16.X and kept the host in the connection object as 'localhost' and it worked fine. Any idea what changed between node.js 16.X and 17.4 that would affect the mysql package? P.S.: There's no binding address in the MySQL server config file. |
Hi, sorry you had trouble. How TCP connections resolve domain name and the errors is all handled by Node.js, which is why changing the Node.js version changes behavior. This module is not actually involved in that behavior. |
Thanks for looking at it so quickly, Doug. |
No problem. I also checked and in Node.js 17.0 changelog says that the DNS resolution no longer puts IPv4 addresses first, instead they are returned as it comes from the OS. Probably the OS hosts file has |
Thanks for following up. The Node.js changelog makes it make sense now (awkward sentence structure). 👍👍 |
No description provided.
The text was updated successfully, but these errors were encountered: