It is really difficult to teach bite inhibition in adult dogs, but here is some info in the form of a puppy article:
Bite inhibition training
Dogs have one defense—their teeth. Every dog can bite. If frightened enough, or in pain or threatened, your dog will bite. That doesn't in any way make him a "bad" dog. It makes him a dog. It's your responsibility, therefore, to teach your dog that humans are fragile. If you teach your dog bite inhibition, that training will carry over even if he's later in a position where he feels forced to bite.
Dr. Ian Dunbar, an expert in the field, tells a story of a bite incident he had to assess. A golden retriever therapy dog was leaving a nursing home when his tail was accidentally shut in a car door. The owner went to help and the dog delivered four severe bites before she could react. Dunbar wasn't the least bit surprised by the dog's response. The dog got his tail shut in a car door! Of course he bit! What
Dunbar was that a dog with no bite inhibition training was being used as a therapy dog.
"Bite inhibition training does not require any added aversive—yelling, 'popping' the dog on the nose or under the chin, shoving your hand down his throat, or spraying him with water.""But he's never bitten before." Of course not. And barring such an incident he probably never would have. But an accident is just that. An accident. Unpredicted. What if something similar had happened in the nursing home? A dog that's had bite inhibition training from puppyhood is less likely to cause serious damage even under severe provocation.
According to Dunbar, there are four stages in bite inhibition training. The first two involve decreasing the force in the bites; the second two stages involve decreasing the frequency of the bites. The training must be done in that order. If you try to decrease the frequency first, the dog won't learn to soften his bite.
Because bite inhibition works by shaping natural play behavior, this kind of training should begin during your first, spontaneous interactions with your puppy and continue in more structured play/training sessions as he grows.
•"No painful bites." Ninety percent of puppies will stop mouthing in mid-bite if you give a high-pitched squeal or yelp. Then you praise the dog and reinforce by continuing to play. The other ten percent—and puppies who are tired or over-stimulated—will escalate their behavior instead of stopping. This requires you to confine the puppy or end the game. Remove all attention. Bite inhibition training does not require any added aversive—yelling, "popping" the dog on the nose or under the chin, shoving your hand down his throat, or spraying him with water.
•Eliminate all pressure. Gradually shape the dog to "gum you to death." (Service dog trainers do this routinely, because service dogs often have to use their mouths to manipulate human limbs.) Set a limit of how hard the dog can bite during play/training sessions. If he bites harder, yelp. Gradually set your limit for softer and softer bites. Move at a pace that ensures that the pup can be successful most of the time. A big jump in criteria is confusing and frustrating to the dog.
•"When I say stop, you stop." Teach cues for "take it," "leave it," and "drop it." Be able to both start and stop the game on your own terms.
•"You may never touch a human with your muzzle unless invited." Put the bite inhibition behaviors you have taught under complete stimulus control. Stimulus control means the behavior happens on cue and only on cue.
Coping with puppy mouthing in the meantime
Although bite inhibition is a vital lesson, making it a training goal doesn't mean you have to tolerate constant puppy mouthing. Puppy teeth hurt!
Work on bite inhibition only when your pup is calm and you have time to sit on the floor and play gently. If the pup bites too hard, yelp. If he backs off, reinforce with calming pats and more interaction. If he gets too excited and bites harder, end the game immediately.
To end the game, you must be able to get away from the puppy with as little fuss or attention as possible. Even negative attention is attention. It's often helpful to have the puppy tethered, so you can simply move back out of his reach. Or play with him in a confined area and simply stand up and leave that space when he bites too hard.
The rest of the time, deal with mouthing by redirecting the puppy to acceptable chew toys. Literally surround yourself with chew toys, so you can stuff them in his mouth, one after the other, until he gets the message that you are not going to let him chew on you.
Puppy mouthing never requires anything more aversive than time outs or withdrawal of attention. Work on bite inhibition when you can, and at other times redirect or end the game. Physical aversives are confusing, unfair, and unnecessary.
You can read more about puppy nipping in the clicker approach to puppy nipping by Karen Pryor.