Adds log for encoding errors in MySQL.

To be fixed soon