biting

Ugh 8mo breastfeeding and lil one has 2 teeth and recently started biting and ouch!!! It hurts.. how do I get him to stop? I tried the say no and put boob away thing but hasn't helped.. 😩 any ideas?