logging the raw data to mysql