How to recover WordPress Adress(URL)

Edit file wp-config.php in root & define site url and home url:

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');

And go to admin dashboard and update permalink (Settings => Permalinks => Update).

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)