I agree w/the others, here....If your dog is not Neutered, a white discharge is common as it's nothing more than lubrication....
However, Green & smelly indicates severe infection.....This is dangerous as left untreated, infection travels fast....Other organs such as the Prostrate can suffer damage along the way....
Please, get this guy to your Vet & have him treated.....This will only get worse and he has had it way too long, poor guy......Oral Antibiotics will be given....Be sure to follow the directions on the prescription.....Good luck and let us know what you find out.....Karla
green discharge is usually a sign of infection and the odor is also. You've had this dog this long with this problem and haven't has it checked? I strongly suggest you take it in to the Vet for a complete check up. This will probably need a course of antibiotics.
A thick green mucus?
This does not sound good! My guess is it could be a chronic infection there. Green, or yellowy-green discharges usually do signify infections of some kind, especially as it smells bad. It must irritate and itch like glory!
Please do him a favour and take him to the vet.
Now you can steam-clean your carpets!