The only way to truly teach kids it's okay to make mistakes, change your mind or say you're sorry is to do these things yourself.
Some kids are perfectionists by the time they get to nursery school. You know what I mean. The ones who have to color neatly, very neatly, and use erasers rather than make a mistake.
They sometimes grow into perfectionist, anal-retentive adults. You know what I mean. Paper-clip counter. You've probably had a few as your boss at some point.
So how do you encourage your little one to be as flexible as possible? By modeling that behavior yourself. When you mess up a recipe (yes, this is from experience), let the child know about it and say something like, "Oh, no big deal, we'll have to think of something else. Who wants pizza?"
Don't get all freaked out and start teaching new four-letter-words to a 10-year-old. Not good behavior, that.
Just relax when things happen. Like if a glass gets broken or a school painting rips. "Oh, too bad. We'll have to make the best of this. Any ideas?"
Something truly sage (if you have your thinking cap on at the time) will make a better and healthier impression than screaming about broken glass.
And when you bump into the table (after you count to 10 and before you start swearing) make sure everyone knows that your own clumsiness led to this happening. Big deal. It's only a bruise!
Then quietly go to your own room, lock the door and scream into your pillow. Emerge refreshed.
And then when your little one (or big one) changes his mind about what to do when he/she grows up, just nod in empathy and let it go.