Asynchronous MySQL binding for Node.js
JavaScript C++ Other
Latest commit a337b41 Jan 3, 2017 @Sannis Gitignore npm-debug.log
Failed to load latest commit information.
doc Regenerate docs Feb 9, 2014
lib Make LOAD DATA LOCAL work for MysqlConnectionQueued Dec 21, 2014
src Read data from handle before call the uv_close() Dec 21, 2014
tests Merge pull request #186 from anton-kotenko/master Dec 24, 2014
tools Merge fetchArraySync and fetchObjectSync to fetchRowSync([options]) Sep 3, 2012
.gitignore Gitignore npm-debug.log Jan 3, 2017
.npmignore Don't publish tests to npm Nov 27, 2013
.travis.yml Revert "Bad version, bad. Very unstable." Feb 8, 2014
CHANGELOG.markdown Bump version to 1.6.0 Feb 9, 2014
DEVELOPMENT.markdown Max line length is 120 symbols for C/C++ sources Sep 2, 2012
LICENSE Copyright in LICENSE updated Sep 19, 2010
Makefile Regenerate API docs Feb 9, 2014
README.markdown Remove Bitdeli Badge Feb 23, 2015
binding.gyp Fix build with node.js v0.11.x using NAN Feb 1, 2014 git describe --tags Feb 9, 2014
nodelint.conf Add some new tests with proper CALL results handling, refs #108 Mar 31, 2012
package.json Update NAN to latest Dec 21, 2014


Node-mysql-libmysqlclient Build status

Asynchronous MySQL binding for Node.js using libmysqlclient.

This module has been tested with Node.js versions 0.8.26, v0.10.25 and 0.11.10


These bindings provides all general connection/querying functions from the MySQL C API, and partial support for prepared statements. Connect, query and fetchAll are asynchronous. This module also includes support for asynchronous querySend from internals of libmysqlclient.

I started this project in 2010 when Node.js was growing. Ryan had plans to write this binding as part of GSoC. It is now used by many projects and has more than 10 contributors, who are listed in the AUTHORS file. I also maintain the Node.js MySQL bindings benchmark which shows how mysql-libmysqlclient performs.

Node-mysql-libmysqlclient's source code is available in the Github repo and you can report issues at the project tracker. Visit the module site for API docs and examples. You can also read some extra information in wiki.


To build this module you must install the libmysqlclient library and the development files for it.
mysql_config is used to determine the paths to the library and header files.
To install these dependencies, execute the commands below for the OS you're running.

For CentOS:

#> yum install mysql-devel

For openSUSE:

#> zypper install libmysqlclient-devel

For Debian-based systems/Ubuntu:

#> apt-get install libmysqlclient-dev

Alternatively, you can use aptitude for Debian-based systems.

Please refer to your system's documentation for more information and feel free to send me a patch for this readme.


You can install this module via NPM:

$> npm install mysql-libmysqlclient

You can also build latest source code from repository. Please refer to the developers documentation for more information.


This module is written in collaboration with many peoples listed on GitHub contributors page. List of authors ordered by first contribution also available.

If you are interested in wide MySQL usage in Node.JS applications, leave your comments to the code. To contribute any patches, simply fork this repository using GitHub and send a pull request to me. Thanks!

All information about development use and contribution is placed in the DEVELOPMENT file.

Users and related projects

This module is used by Taobao guys for their distributed MySQL proxy Myfox-query module. There is long time developed Node.js ORM library called noblerecord. It is inspired by Rails and widely used by Noblesamurai. If you are looking for lightweight Node.js ORM on top of this module, try mapper by Mario Gutierrez.


Node-mysql-libmysqlclient itself is published under MIT license. See license text in LICENSE file.