Want to block all posts of spacific author via robots.txt file

You should use the robots_txt filter to exclude all of the URLs of posts written by specified author (untested):

add_filter( 'robots_txt', static function ( $output ) {
    $query = new WP_Query( array(
        'author' => 3,
        'posts_per_page' => -1,
        'no_found_rows' => true,
        'fields' => 'ids',
    ) );

    if ( ! $query->have_posts() ) {
        return $output;
    }

    $siteurl = untrailingslashit( get_site_url() );

    foreach ( $query->posts as $post ) {
        $url     = str_replace( $siteurl, '', get_permalink( $post ) );
        $output .= sprintf( 'Disallow: %s\$%s', $url, PHP_EOL );
    }

    return $output;
} );

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