Get Post Terms of Current Post (selected taxonomy term) – How to get only the taxonomy value and not “Array ( [0] => taxonomy term )” in the frontend?

Assuming the taxonomy name is “animals”

<?php
    //This will show all the terms in taxonomy whether they have posts or not thus the "hide_empty"
    $terms = get_terms( array ( 'taxonomy' => 'animals', 'hide_empty' => false, 'parent' => 0, 'orderby' => 'description', 'order' => 'ASC' ));

    foreach ($terms as $term) {
        // The $term is an object, so we can get the names.
        //use var_dump($term) to see other options available
        echo $name = $term->name;
    }
?>

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