Implemented mysql connection as own class.