My dad had a simple policy that worked for me. His rule was, if you get into a fight, I’m going to give you 10 licks with the belt. If you loose the fight, I’m going to give you 10 more.
I only got into one fight with a bully over a game of marbles. After doing all the “stop” and other crap the teachers taught ... I popped him in the mouth and split his lip. While I got my 10 licks, I did not get the extra 10 and I was never bothered again.
I learned not to get involved with the bully's parents when my now older sons were young. Usually the parents were bullies themselves & of course their little darling is never to blame. Most of the time after a fight my sons & the bully ended up getting along. I found the school was usually no help. I told my children if you are hit first then by all means defend yourself. That worked. I don't like fighting but sometimes there is no other way. Telling a child to walk away isn't going to stop the bullying.