How to disable error messages to screen while mysql service is down
Having just run across the same issue, to avoid hacking the core files you can set the default error reporting level in your site's settings.php by adding the following line:

$conf['error_level'] = ERROR_REPORTING_HIDE;


Since the error_level variable is normally set from the database the setting otherwise defaults to DISPLAY_ALL if MySQL is down.

Note: this means the error level can no longer be configured through the admin interface (admin/config/development/logging).