MySql Ported code merged

Merged in the MySql ported code and libs