How to get terms of not only the current cat but also of all its children

$terms = get_term_children( $term->term_id , $taxonomy );
$term_array=array();
foreach($terms as $terms){
  $term_array[]= $terms;
}

$_products_in_term = get_objects_in_term( $term_array, $taxonomy ); 

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