If your site is constantly getting the dreaded database connection error and would like to show a better message, create a new file name db-error.php in the wp-content directory. Keep in mind, you do not have access to WP functions or core API and this file contents should be straight PHP and HTML code. You can have an entertaining image shown and get the current path from the $_SERVER parameter.
Additionally, using textbelt.com/text you can send yourself a mobile text message every time your database goes down. You should have unlimited text on your phone and curl support on your server. Keep these text messages short. I also included the remote_addr, request_uri and the jsonized request parameter.
Adding the db-error.php file to my site and sending a text message that includes the remote_addr, query and request, identified an hack attempt trying to login, showing the userid/password combinatoion the hacker was using. The hack originated from the netherlands.