1) Open cpanel file manager.
2) Select wp-config.php file located in your wordpress root folder.
3) Open it in code editor.
4) Press Ctrl+F and find 'DB_HOST'. It should be on line 28
5) Right after that change the text any written to localhost.
6) After editing it should look like this.
PHP:
/** MySQL hostname */
define('DB_HOST', 'localhost');