sidorares / sidorares/node-mysql2

ETIMEDOUT error since v1.1.1

Open
#439 32 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs investigation
Dominant language
TypeScript
Stars
4.4k
Forks
680
Avg merge
9h 7m
Merged PRs (30d)
59

Description

I have a local mysql database that I use for testing and v1.1.1 introduced some sort of bug or configuration change that is causing the error:

{ Error: connect ETIMEDOUT
    at Connection._handleTimeoutError (/home/myuser/code/itemdrop/node_modules/mysql2/lib/connection.js:166:13)
    at ontimeout (timers.js:365:14)
    at tryOnTimeout (timers.js:237:5)
    at Timer.listOnTimeout (timers.js:207:5)
  errorno: 'ETIMEDOUT',
  code: 'ETIMEDOUT',
  syscall: 'connect',
  fatal: true }

Confirmed this does not happen with v1.1.0 by downgrading my project back to that version. I'm using knexjs v0.12.2 to connect with the connection object of:

var knex = require('knex')({
    client: 'mysql2',
    connection: {
        host: 'localhost',
        user: '***',
        password: '***',
        database: 'mydb'
    }
});

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at node_modules/mysql2/lib/connection.js:166 and compare connection behavior between v1.1.0 and v1.1.1 using the provided localhost MySQL and Knex configuration. Reproduce the ETIMEDOUT failure, then review the comment thread for existing findings. Done means the configuration connects successfully on v1.1.1 without regressing the v1.1.0 behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, node.js
Domain
database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.