When is get_currentuserinfo() needed?

Personally I would use wp_get_current_user(), no globals:

function plugin_admin_init() {
    $user = wp_get_current_user();
}

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