Indenting Category list

$args = array(
    'type' => 'post',
    'hide_empty' => 0,
    'hierarchical' => 1,
    'taxonomy' => 'category',
    'pad_counts' => false
);
$categories = get_categories($args);

foreach($categories as $category) { 

    echo '<tr>';

    if($category->parent != 0){ // If this is a subcategory
        echo "<td>&nbsp;&nbsp;$category->name</td>";
    } else {
        echo "<td>$category->name</td>";
    }

    echo "<td><input type="text" name="$category->cat_ID"/></td>";
    echo '</tr>';

}

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