A pure-JavaScript MySQL client for Node.js (v0.4.7) that implements the MySQL wire protocol directly, requiring no native C++ addons or external MySQL runtime. It supports TCP and UNIX socket connections, automatic prepared statement caching, pipelined queries, and transparent handling of row and binary row packets. Released under a rolling cadence, this package is a legacy choice superseded by more modern MySQL drivers like mysql2 or mysql (felixge). It is best suited for older Node.js environments (>=0.6.0) or educational exploration of protocol internals.
npm install mysql-nativeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to MySQL, authenticates, runs a simple query with event listeners, and closes the connection.
Migrate to a maintained driver like mysql2.
Set client.auto_prepare = true before calling execute().
Use 'row' for rows, 'field' for field metadata, 'end' for result completion.
Explicitly pass '127.0.0.1' instead of 'localhost' when calling createTCPClient.
Ensure you create a client first: const client = createTCPClient(); then client.auth(...).
No dependency data recorded yet.