Mucus in the stool is a sign of a candida yeast infection. Basically the bad bacteria in your body has taken over the good bacteria. Wheat, yeasty and fermented drinks like beer, and sugar will do that.
Change your diet or be consumed by evil bacteria.