BSD-3-Clause licensed by Bryan O'Sullivan
Maintained by Paul Rouse
This version can be pinned in stack with:mysql-simple-0.4.5@sha256:0a2caf5f0d84d0577a796cf48debd2d37e70e78ade3f6efbf78293e064f63c2c,2282

mysql-simple: mid-level bindings to the mysqlclient library

This library is a mid-level Haskell binding to the MySQL mysqlclient client library. It is aimed at speed and ease of use.


This library is BSD-licensed under the terms of the MySQL FOSS License Exception.

Since this library links against the GPL-licensed mysqlclient library, a non-open-source application that uses it may be subject to the terms of the GPL.

To do

  • Add support for prepared statements. This API is huge and of dubious performance worth, so it’s not currently a priority for me. Patches welcome!

Get involved!

We are happy to receive bug reports, fixes, documentation enhancements, and other improvements.

Please report bugs via the github issue tracker.

Master git repository:

  • git clone git://


This library was written by Bryan O’Sullivan, [email protected], to whom all of the credit is due. It is now being maintained by Paul Rouse, [email protected].



  • Add Semigroup instance for Query
  • Add a (Param a) => Param (In (Set a)) instance.
  • Drop testing under GHC 7.8 / lts-2


  • Report table name and database in the UnexpectedNull case of ResultError, using the previously empty errMessage field


  • Add type VaArgs for non-parenthesized variable-length list of parameters.
  • Include fieldName in other constructors of ResultError.

  • New maintainer and GitHub location - with many thanks to Bryan O’Sullivan for all of the past work on this module, and for facilitating the transfer of maintenance responsibility.
  • Extra instances of QueryParams for larger tuples.
  • Include fieldName in ResultError in the case of the Incompatible constructor.

The changes to ResultError and QueryParams were previously unreleased, although present in the GitHub repository. They are the reason for the major version bump.