It is very possible that you are having a fecal impaction, a large mass of dry, hard stool that have developed in the rectum due to chronic constipation.
This causes abdominal cramping pain (as the muscles of bowels walls try to push the stool down the tract), and rectum discomfort, since the stool has caused a intestinal blockage.
The blockage only allows watery waste to pass through the body, and the bowel movements are in form of diarrhea and thin stools, despite constipation.
Straining to have a stool, accompanied with mucus is another symptom.
See your physician.
If this is your problem, you should be treated with colon irrigation.