Update wordpress user roles not working as excepted

Its better to register this role with add_role ( docs ) before adding it to user

Also, if you want to change roles attribute, try set_role instead of add_role

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