Get a different size of Image thumbnail while working with custom metabox

use this one and follow the structures

  $post_thumbnail_id = get_post_thumbnail_id( $post_id ); 
 $imgarr = wp_get_attachment_image_src($post_thumbnail_id,'medium'); 
 echo $imgarr[0];/*it will return image url in medium size*/

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