Thanks for query,
It seems that you might be having Fissure in ano
or from your history it is possible that you might be having Fistula in ano.
Consult surgeon and get examined.
In both cases you may require surgery.
and take plenty of water.
Ok and bye.