Problem ID to exclude specific posts from category

Try this:

function exclude_single_posts_cat($query) {
    if ( is_admin() || ! $query->is_main_query() )
        return;
    if ( $query->is_archive() ) {
        $query->set('post__not_in', array('1','2','3'));
    }
}
add_action('pre_get_posts', 'exclude_single_posts_cat');

Issue: The issue in your first approach is you have added extra curly brackets and comma.

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