MySQL bindings for Node.js using libmysqlclient.
Check out the Github repo for the source code.
Visit module site for API docs and examples.
Extra information available in wiki.
Master (development) branch build status:
This module tested with Node.js version 0.4.12 (@v1.2.5) and 0.6.11 (@v1.2.10).
To build it you must install libmysqlclient library and development files for it. Node-waf use mysql_config to determine the paths to the library and header files. To install these dependencies, you can use the console.
For CentOS:
#> yum install mysql-devel
For openSUSE:
#> zypper install libmysqlclient-devel
For Debian/Ubuntu:
#> apt-get install libmysqlclient-dev
Yes, you would use aptitude if you want.
You can install this module via NPM:
$> npm install mysql-libmysqlclient
Also you can build latest source code from repository, see below.
To get source code:
$> git clone git://github.com/Sannis/node-mysql-libmysqlclient.git
$> cd node-mysql-libmysqlclient
If you want to build specific version of node-mysql-libmysqlclient, checkout it:
$> git checkout v1.0.2
To build the bindings you should run:
$> node-waf configure build
To rebuild:
$> node-waf distclean configure build
To run tests:
$> npm install nodeunit
$> node-waf test
To lint code:
$> npm install nodelint
$> # install cpplint.py
The two files required to use these bindings are ./mysql-libmysqlclient.js and ./mysql_bindings.node (build/default/mysql_bindings.node). Put module directory in your NODE_PATH or copy those two files where you need them.
I will be happy to hear tips from the more experienced programmers. If you are interested in wide MySQL usage in Node.JS applications, leave your comments to the code. I'll be glad to see your forks and commits in them :)
To contribute any patches, simply fork this repository using GitHub and send a pull request to me. Thanks!
You can find other information about contributing and code style guide in wiki.
-
Oleg Efimov ( E-mail, GitHub, site )
Author and maintainer.
Synchronouse version development.
First libeio asynchronouse attempts.
Writing tests, docs and so on.
All commits. -
Surendra Singhi ( E-mail, GitHub, GitHub2, site )
Make asynchronouse connecting and querying work.
Fix segmentation faults, partialy closes #14.
Some other fixes.
All commits. -
Akzhan Abdulin ( E-mail, GitHub )
Tests and code style fixes.
All commits. -
Pavel Ponomarenko ( E-mail, GitHub )
Add URL shortener example script. Make good suggestions to improve the functional.
All commits. -
Robin Duckett ( E-mail, GitHub )
Fix segfault error, partialy closes #14.
All commits. -
Roman Shtylman ( E-mail, GitHub )
Free result object after fetchAll() callback, closes #60.
Link libev for 'ev_default_loop_ptr' symbol.
All commits. -
Dan Beam ( E-mail, GitHub, site )
Simplify javascript logic of createConnection().
All commits. -
Maurits Lamers ( E-mail, GitHub )
Fix a bug where previous values were set instead of empty.
All commits. -
Benjmain Reesman ( E-mail, GitHub )
Fix bug with building with libmysqlclient at specific location.
All commits. -
Krists Krīgers ( E-mail, GitHub )
Fix bug with res.fetchAll(), discussed at the end of #71.
All commits. -
Sergey Novgorodsky ( E-mail, GitHub )
Fixes for compilation errors.
All commits. -
Ștefan Rusu ( E-mail, GitHub )
Fixes for Node.js 0.4/0.6 compatibility.
All commits. -
Zhiqiang Zhao ( E-mail, GitHub )
Fix bug with wrong 1194 erro handling.
All commits.
MIT license. See license text in file LICENSE.