Make a permalink to the most recent blog post

Use get_posts with posts_per_page => 1 to get only one latest result. You can than use get_permalink() to get the permalink.

$args = array(
         'posts_per_page'   => 1,
        'orderby' => 'date',
        'order'   => 'DESC',
            ) ;
$latest_posts = get_posts($args);
$permalink = get_permalink($latest_posts[0]->ID);

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