How to make widget appear conditionally

You should put the conditional at the start of the widget() function:

public function widget( $args, $instance ) {
    // Not single post or not in the pladeanmeldelser category.
    if ( ! is_single() || ! in_category('pladeanmeldelser') ) {
        return;
    }

    $title = apply_filters( 'widget_title', $instance[ 'title' ] );
    // ... other code.

}

And that should work.

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