Listing categories on a wordpress page

FOR : category display horizontally.
This code put into the function.php file. Create a function for list of category.

    function category_name(){
    $cat = get_terms(array('taxonomy'=>'category'));
    echo '<div clss="design">';
    foreach($cat as $ca){
        echo '<span>';
        echo $ca->name.'&nbsp&nbsp';
        echo '</span>';
    }
    echo '</div>';
   }

After put this code call the function echo category_name(); when you get the list of category.

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