Add mysql support

Added support for MySQL. All the db tests pass for me. Comments welcome!