Separate the tag by comma [duplicate]

This is actually more php related. Best will be to add your term names in an array and then use implode to convert it to a comma separated string

$my_tags = get_the_tags();
if ( $my_tags ) {
    foreach ( $my_tags as $tag ) {
        $tag_names[] = $tag->name;
    }
    echo implode( ', ', $tag_names );
}

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