Getting thumbnail of uploaded image

Where are you attempting to get the image? That should be the correct function:

global $post;
$image = get_the_post_thumbnail( $post->ID );

It will return an array of all the image sizes for that given image. You can then grab the image size out of the array, or better yet pass in a specific image size to the function to return the correct size:

global $post;
$image = get_the_post_thumbnail( $post->ID , 'thubmnail' );

as you can see we’ve passed in the ‘thumbnail’ image size. $image will then return the url to the image size. You can then use it in an image tag, like so:

<img src="https://wordpress.stackexchange.com/questions/166150/<?php echo esc_attr( esc_url( $image ) ); ?>" alt="thumbnail image">

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