title: PHP error exposes database credentials
body: <p>I've been working with a PHP application that connects to a MySQL database using PDO. Whenever there's a fault in the connection we get an error like this:</p>
  
  <p><img src="https://i.stack.imgur.com/NlMo7.png" alt="PHP PDO Error"></p>
  
  <p>This often happens when updating server details or when adding a new server to the cluster, and is occasionally visible to end-users. I'm particularly concerned as the resulting error exposes connection details used for the database. Is it possible to change the error reporting so that we show what the error is without including the connection details themselves?</p>