But a good boss would have turned that around in to a shared lesson where both parties came out ahead, instead of leaving one side insecure enough to ask about it online.
Compliments work so much better than rebukes in situations like this.
Wow George that was really clever of you, why don't we have lunch together.
And informally:
What do you think could have happened ?
What do you think would have been the consequences if your attempt had led to a system crash or worse ?
How should we deal with this next time you have a burning urge to try something like this ?
What would you have done if you were in my shoes and someone crashed a server on purpose ? (yes it was a dev box)
So, in closing George, I'm really happy that you brought this to my attention, but in the future the best way to deal with this sort of situation is to first talk it over with someone higher up before hitting 'go'.