This repository has been archived on 2018-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
node-task/node_modules/mysql2/debug.md

932 B

Debugging driver issues

You can enable debug output using debug config option:

var conn = mysql.createConnection({
  port: 3306,
  host: '1.2.3.4',
  debug: true // <---
}

Also you can make additional information available during initialization if you sert enfironment variable NODE_DEBUG

Interpreting debug log

Add command: Connection
Add command: query
 ==> Connection#handshakeInit(0,,78)
 <== Connection#handshakeInit(1,HandshakeResponse,67)
 ==> Connection#handshakeResult(2,maybeOK,7)
Sending query command: select * from mil limit 10
 <== query#start(0,Query,31)
 ==> query#resultsetHeader(1,,1)
 ==> query#readField(2,,36)
 ==> query#fieldsEOF(3,EOF,5)
 ==> query#row(4,,2)
 ==> query#row(5,,2)
 ==> query#row(6,,2)
 ==> query#row(7,,2)
 ==> query#row(8,,2)
 ==> query#row(9,,2)
 ==> query#row(10,,2)
 ==> query#row(11,,2)
 ==> query#row(12,,2)
 ==> query#row(13,,3)
 ==> query#row(14,EOF,5)