adding mysql support to write the info into the db