How to create a shortcode out of a php function

Using the do_shortcode() function actually calls another shortcode if that one exists. Instead, it should look like the following:

add_shortcode('relatedlinks', 'related_links_shortcode');
function related_links_shortcode() {
    return wp_related_posts();
}

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