mysql2

fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS

  • mysql2

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
mysql2
3,8934463.9.33 days ago11 years agoMinified + gzip package size for mysql2 in KB

Readme

MySQL2
!NPM Versionnpm-imagenpm-url !NPM Downloadsdownloads-imagedownloads-url !Node.js Versionnode-version-imagenode-version-url !GitHub Workflow Status (with event)ci-imageci-url !Codecovcoveragecoverage-url !Licenselicense-imagelicense-url
Englishdocs-base | 简体中文docs-base-zh-CN | Português (BR)docs-base-pt-BR
MySQL client for Node.js with focus on performance. Supports prepared statements, non-utf8 encodings, binary log protocol, compression, ssl much moredocs-documentation.

Table of Contents

History and Why MySQL2

MySQL2 project is a continuation of MySQL-Nativemysql-native. Protocol parser code was rewritten from scratch and api changed to match popular Node MySQLnode-mysql. MySQL2 team is working together with Node MySQLnode-mysql team to factor out shared code and move it under mysqljsmysqljs organization.
MySQL2 is mostly API compatible with Node MySQLnode-mysql and supports majority of features. MySQL2 also offers these additional features:

Installation

MySQL2 is free from native bindings and can be installed on Linux, Mac OS or Windows without any issues.
npm install --save mysql2

If you are using TypeScript, you will need to install @types/node.
npm install --save-dev @types/node

For TypeScript documentation and examples, see heredocs-typescript-docs.

Documentation

- First Querydocs-qs-first-query, Using Prepared Statementsdocs-qs-using-prepared-statements, Using Connection Poolsdocs-qs-pooling and more.

Acknowledgements

Contributing

Want to improve something in MySQL2? Please check Contributing.mdcontributing for detailed instruction on how to get started.
To contribute in MySQL2 Documentation, please visit the Website Contributing Guidelinesdocs-contributing for detailed instruction on how to get started.