wp_signon returns user but the user is not logged in because wp installed on subdomain. How to make it work?

I solved the problem. Here’s the solution.

Add this line to your wp-config.php :

define('COOKIE_DOMAIN', '.yourdomain.com');

save the file and upload. That’s all.

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