get the permalink error

You need to remove the $leavename = portion out. That’s the parameter reference.

So your code should be:

echo get_the_permalink($post, true);

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