does wp_insert_term link the term to a certain post ID?

Yes, wp_insert_term() only creates the term. To assign the term to a post use wp_set_object_terms()

wp_set_object_terms( $object_id, $terms, $taxonomy, $append ); 

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