How can I display the category name in the single post when using WP Blog and Widget?

You can you just simply put this code into your singl.php

foreach((get_the_category()) as $category) 
{
    echo $category->cat_name . ' '; 
}

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