How can I show second most recent post in sidebar, if most recent post is open in the browser?

You can use the WP Query option “post__not_in” for that, this variable should be an array with IDs of posts that should not appear on the result, so you would use it like that:

$the_query = new WP_Query(array(
        'post__not_in' => array( get_the_ID() ),
        'post_type' => 'articles',
        'post_status' => 'publish',
        'posts_per_page' => 1,
        'orderby' => 'date',
        'order'   => 'DESC',
        'tax_query' => array(
            array(
                'taxonomy' => 'article_category',
                'field' => 'slug',
                'terms' => 'interju',
            )
        ),
    ));

Note that, the get_the_ID() will retrieve the ID of the most recent post from a loop, so you may need to retrieve the ID of the post early and use it instead of the get_the_ID()

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