How to update post parent?

Use wp_update_post(), not insert.

wp_update_post(
    array(
        'ID' => $image_id, 
        'post_parent' => $new_post_id
    )
);

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