Correctly quote MySQL errors.