Redirect when sql server fails
Some time in Linux based (Free) hosting services the server down occurs only to mysql server. But the apache server works well.
In that time if you are using database connectivity in php code, it will expose error message to the end user.
There is a way to hide the error message and redirect the user to alternate website if you want.