Changing siteurl breaks site

Put this in your theme template functions.php

update_option( 'siteurl', 'http://example.com' );
update_option( 'home', 'http://example.com' );

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