Assign Custom post to Custom Taxonomy

$object_id is supposed to be a post’s ID, make sure first that $post->ID would even output an ID, if not, the problem lies there.

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