How can I get the name of term post meta value which equals term id

You can use get_term_by to retrieve a term by its ID:

$term_id = 123;
$term = get_term_by( 'id', $term_id, 'location' );
if( $term ){
    echo $term->name;
}

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