Working dynamic database.

Used a custom driver that extends the mysql one instead of relying on a
connection wrapper that doesn't work.