Remove 2 categorgies when post status changes from private to publish

It is because you are trying to pass array of string instead of int.

So it search for terms slug with this value instead in terms id.

function remove2categories( $new_status, $old_status, $post ) {
    if ( $old_status == 'private' && $new_status == 'publish' && !in_category(array(3152), $post ) ) {
        $catsID = array(1186, 1208);
        wp_remove_object_terms( $post->ID, $catsID, 'category' );
    }
}
add_action( 'transition_post_status', 'remove2categories', 10, 3 );

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