Get array of current post term ID’s

To get the attached term IDs, use get_the_terms() and wp_list_pluck():

if ( $terms = get_the_terms( $post, 'director' ) ) {
    $term_ids = wp_list_pluck( $terms, 'term_id' );
}

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