changing site domain name. Is this a bad solution?

The proper way is after pointing the new domain to your hosting account to change the URL references in the Database. So, besides the siteurl & home options you shouldn’t forget upload path at the same table and a complete search & replace for local links and media URLs inside post contents.

There are many ways to do this according to the Codex.

Lately I’ve been using the WordPress Search & Replace tool that can scan all required tables to replace the URLs. ( Always backup the DB first )

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