Setting a cookie in functions.php and it gets deleted when working on an other function

Setting a cookie in functions.php and it gets deleted when working on an other function

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