log the mysql error to common log