How to get featured image thumbnail to open larger version in attachment page?

Use get_attachment_link to get a link to the attachment page or take a look at wp_get_attachment_link which might simplify the process.

<?php if(has_post_thumbnail()) : ?>
    <div class="spudpictureandcontentwrapper">
    <div class="illustration"><?php

        $attachment_id = get_post_thumbnail_id();

        $large_image_url = wp_get_attachment_image_src($attachment_id, 'large');

        $attachment_page = get_attachment_link($attachment_id);

        echo '<a href="' . esc_url($attachment_page) . '" title="' . esc_attr(get_the_title($attachment_id)) . '" >';

        the_post_thumbnail('thumbnail'); ?>

        </a></div>

<?php endif; ?>

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