Are you seeing the 'Error establishing a database connection' notice on your WordPress website? It is a fatal error that makes your WordPress website inaccessible to the users.
This error occurs when WordPress is unable to connect to the database. A number of things can affect your WordPress database connection which makes it a bit difficult for beginners to troubleshoot.