How to Fix the Error Establishing a Database Connection in WordPress

Please check the wp-config file check your wp-config.php on your root of the server and please recheck your all database server connection details