MySQL integration

This patch introduces basic support for MySQL.