getting url from variable that calls picture of current page, not working. Only displays everything instead of url

get_the_post_thumbnail function returns the post thumbnail image tag as a string.
Use get_the_post_thumbnail_url function instead to get url.

$url = get_the_post_thumbnail_url($pid, 'full');

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