Installing Database Drivers for MySQL#


See Installation for the easiest way to get the best drivers.


umysql support was removed in RelStorage 3.0. Use ‘gevent MySQLdb’ instead.


mysqlclient 1.4 is not available on Windows for Python 2. PyMySQL is tested instead.

For CPython3, install mysqlclient 1.4+; PyMySQL, and MySQL Connector/Python are also known to work (but MySQL Connector/Python is not recommended).

On PyPy, install PyMySQL 0.6.6+ (PyPy will generally work with mysqlclient, but it will be much slower). MySQL Connector/Python is tested to work on PyPy 7.1 (but MySQL Connector/Python is not recommended)

Here’s a table of known (tested) working adapters; adapters in bold are the recommended adapter installed with the extra.

Tested Adapters#




  1. mysqlclient

  2. PyMySQL

  3. MySQL Connector


  1. PyMySQL

  2. MySQL Connector


mysqlclient can be used with gevent by explicitly choosing a gevent-aware driver. PyMySQL and MySQL Connector/Python (without its C extension) are compatible (cooperative) with gevent when the system is monkey-patched.

For additional details and warnings, see the “driver” section in MySQL Adapter Options.