Get ID of child from child slug, while knowing parent ID

You should use the pagename parameter for WP_Query along with post_parent. Limit your query to one post using posts_per_page.

$parent_id = get_the_ID();
$args = array(
    'post_type'      => 'page'
    'pagename'       => 'page-2',
    'post_parent'    => $parent_id,
    'posts_per_page' => 1
);
$posts = get_posts( $args );
$child = isset( $posts[0] ) ? $posts[0] : false;
if( $child ){
    //Do Something
}

This, in theory, should render your desired post by slug using the parent ID.

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