Why https://www. SUBdomain is redirected by WP to https://MAINdomain

WordPress Address (URL) and Site Address (URL) are set to https://maindomain

I mean, there’s your answer. WordPress uses the URL you set in Settings as the canonical URL.

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