Should I display MySQL errors directly in a production environment?

Responsive Ad Header

Question

Grade: Education Subject: Support
Should I display MySQL errors directly in a production environment?
Asked by:
67 Viewed 67 Answers

Answer (67)

Best Answer
(296)
No, it is generally not recommended to display raw MySQL error messages directly to end-users in a production environment. These messages can contain sensitive information about your database structure or server. Instead, log the errors for debugging and show a generic error message to the user.