Most dogs learn about bite inhibition as puppies, through ordinary roughhousing with other dogs. Two dogs go at it, one goes too far and gets a reaction and they both learn from it. Ideally, that lesson carries over into the dog’s interactions with other dogs and people, too. If you behave similarly to how another dog would have behaved during rough play in puppyhood, you can still teach that lesson to your adult dog today.
If the dog bites you while playing, give a little yell to show your reaction; alternatively, give a firm verbal warning, and praise him when he stops. If the behavior continues, try a time out. When bitten, give a little yell so there’s an audible clue that he’s overstepped, and ignore the dog for a short period, like 20 seconds. If necessary, remove yourself from the room if the behavior repeats. As time goes on and this process repeats, lower your tolerance to bites so your dog learns that he needs to go easier.
Other alternatives include cutting down on the mouthing in general by swapping out your hand for a toy, and avoiding intense contact play, especially avoiding putting your hands close to the dog’s mouth and face; instead, use fetch or tug of war. Work on your pet’s self-control skills like sitting or staying, and encourage greater social interaction with other dogs (safely). Finally, some pet owners do have success using taste deterrents.