Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Erlang MySQL Driver (from

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 include
Octocat-spinner-32 src
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 COPYING.txt
Octocat-spinner-32 Makefile
Octocat-spinner-32 README.txt
Octocat-spinner-32 SOURCE.txt
Octocat-spinner-32 rebar
Octocat-spinner-32 rebar.config
Description: Revamped MySQL driver for Erlang
Modified by: Yariv Sadan (
Modified again by: James Golick (

This MySQL driver for Erlang is based on the Yxa driver obtained from Process One (at It includes several new features such as prepared statements, transactions, binary queries, type-converted query results, more efficient logging and a new connection pooling mechanism.

This fork (jamesgolick/erlang-mysql-driver) turns mysql_conn in to a gen_server and depends on poolboy for connection pooling.

It also makes preparing of statements immutable. There is no way to reuse names when preparing statements because that was a recipe for disaster anyway.

A lot of the logging stuff has been removed, but I'm working on that.

To configure, put something like this in sys.config:

	  {pools, [
	     {my_pool_name, [{size, 10},
			     {max_overflow, 20},
			     {host, "localhost"},
			     {port, 3306},
			     {database, "my_database"},
			     {user, "root"},
			     {password, ""},
			     {encoding, utf8}

Then, start the otp application:


Then use the interface on the mysql module to query your database.
Something went wrong with that request. Please try again.