Redirect from the dashboard to edit.php if wp_is_mobile() is true

The action you’re looking for is auth_redirect, which is before the headers but still recognizes $pagenow to tell which page you’re on:

add_action('auth_redirect', 'the_mobile_boot');
function the_mobile_boot() {
    global $pagenow;

    if ( $pagenow == 'index.php' && wp_is_mobile() ) {
        header( 'Location: ' . get_admin_url(null, 'edit.php') );
        exit;
    }

}

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