Usage of do_action and add_adction

You need to echo your data. Try this instead –

function add_link_to_aff() {
    $html_output =  "<li><a href="#">" .  __( 'Test', 'yith-woocommerce-affiliates' ) .  "</a></li>";
    echo $html_output;  
}
add_action( 'yith_wcaf_after_dashboard_links', 'add_link_to_aff', 10 );

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