Log error message for failed MySQL connections