Build a web application backend that reads and writes data to a MySQL database.
Stream large query results row by row to avoid loading millions of records into memory.
Manage multiple simultaneous database connections efficiently using connection pooling.
This is a Node.js driver for MySQL databases, a library that lets JavaScript applications running in Node.js connect to and query a MySQL database. It is written entirely in JavaScript, requires no native compilation, and is MIT-licensed. The library handles the full range of database operations: establishing connections, running queries, inserting and retrieving data, managing transactions, and handling errors. It supports connection pooling, which means instead of opening a new database connection for every request, a pool of connections is kept ready and reused, which improves performance in web applications handling many simultaneous users. Security is handled through automatic escaping of values and identifiers passed into queries, which prevents a common attack called SQL injection. The library also supports streaming large result sets row by row rather than loading everything into memory at once. It is installed via npm and works in any Node.js environment.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.