WordPress redirects to old login after migration

Try to add the following two lines in wp-config.php file:

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

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