I have extremely bad gas and bloating. My stools are now yellow and have mucus. I have been in constant pain for 2yrs. I have been through many tests?

Seek more opinions. I suggest you seek a consultation with a gastroenterologist (a medical specialist in diseases of the GI tract.) in the meantime, i suggest good hydration, a balanced diet, and yogurt or probiotics. There are too many possibilities to discuss, but your situation is not normal , and i encourage you to take charge of your medical health. Good luck.