cre8tives wrote:
I'd like to customize the generic "error establishing a database connection" message when a system goes down.
[snip]
So, does anyone know where this file lives? Is it part of PHP, MySQL, Nginx?
That message is usually crated by the application having trouble connecting to the database. It is not a page, and is not created by any specific component of your stack (eg, PHP, MySQL or Nginx).
Depending on which application you are using (custom/rolled your own, Wordpress, Drupal, etc, etc) the error message will be different and will be created in a different file with different code.
Customizing this error message is trivial. Once you find the code file that handles the database connection you'll see either the generic message or the call to the function that handles all database errors. If you see the generic message you can customize it right there (after you make a backup of the file, of course). If you find a function that handles all database errors you will need to code find the file that contains that code and go from there.
Once you've found the code that does the error handling you can probably find some help by searching the internet for something like "mysql handling connection errors" (
without the quotes)