# mysqljs/mysql

A pure node.js JavaScript Client implementing the MySQL protocol.

Repository: https://github.com/mysqljs/mysql
Canonical: https://ross.abutalabs.com/products/mysql
Language: JavaScript
License: MIT
License Family: permissive
Topics: javascript, nodejs, mysql
Last push: 2024-06-25T12:03:39+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 5879, "days_push": 799, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 18616, forks 2521 (observed 2026-08-28T04:11:26.893438+00:00)

## What it is
A pure JavaScript Node.js client library implementing the MySQL protocol, providing query execution, connection pooling, transactions, and streaming results without native compilation. It is the widely used 'mysql' npm package, MIT licensed.

## Use cases
- connect to a mysql database from node.js
- run sql queries in a nodejs app
- pool mysql connections in an express server
- stream mysql query rows to a file
- execute transactions with mysql in javascript
- insert rows and get the inserted id in node

## When to choose
- you need a dependency-free, pure JavaScript MySQL driver for Node.js
- you want mature, battle-tested MySQL connectivity with pooling and streaming
- you cannot compile native addons in your deployment environment

## When to avoid
- you need the latest MySQL 8 features or best performance - consider mysql2 instead
- you need promise-based APIs out of the box without wrappers
- you are not using Node.js

## Facets
- artifact type: library
- maturity: maintenance
- function: database-driver, database
- domain: databases, backend, web-development, developer-tools
- platform: -
- tags: mysql, sql, connection-pooling, pure-javascript, npm, nodejs, javascript

## Member repositories
- mysqljs/mysql (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:11:26.893438+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:01:21.420661+00:00, confidence not recorded.
  - readme: https://github.com/mysqljs/mysql (fetched 2026-08-28T04:11:26.893438+00:00, sha 1990136df293)
  - registry_npm: https://registry.npmjs.org/mysql (fetched 2026-08-29T07:59:48.132793+00:00, sha 97cb0738d453)
- Data as of 2026-08-30T08:39:29.467469+00:00.
