A bully is a tyrant in training. Dealing with a bully is as challenging as dealing with a tyrant -- none of us are born with the skills to handle them well.
When I was about 7yo, I asked my mom, "Mommy, why do kids act one way at school and another way when they are not at school... I am me wherever I am?" The question fell on confused ears as it does for so many of us: "Why are people not true to themselves?"
The answer is that they are, but that they do not know themselves and that leads to inconsistent behavior as they try to define themselves.
How do you deal with a bully? You yourself have listed a variety of ways, but how does one -- on the fly -- choose which of those ways?
Your child will choose the way they see most fitting at the time. Your task is to help them in identifying the options available to them even though they may not have seen them at the time.
For example, my mother once told me of a school she attended where she was the only one of that race present. The other girls would pick on her and sometimes that would result in violence. One day she ended that by carrying a brick in her purse. When she walloped them with it, she was given respect and left alone.
As another example, when I was in high school there were these guys I thought would try to get violent with me. I offered to teach them what I knew of martial arts. After the first class, they asked me if I would ever use it against them. I replied with the question, "Well, you would never attack me, right?" No battle ever ensued.
The "solution" to a problem is a function of the nature of the other person. Your task is to help your child identify the nature of the other person so that the most peaceful solution can be achieved.
That said, do not think of it as a failure on your child's part, but an opportunity for you to better educate your child on the process of understanding the other party so that an effective (ideally peaceful) solution can be achieved.
"How?" was your question. The answer you already know. My reply is that you'd be best served in delivery the answer while simultaneously respecting the context so that your child can grow to be the balanced adult s/he is meant to be.