not really sure about the validity of your overall point, but at least for mysql I would say that's a one off.
most open source software is not going to be ridiculously profitable, and buyng mysql was a desperation for sun which didn't pay off.
not every startup can open source their code. some can, as reddit did, but this would not seem to be advisable from time zero, more something you have the luxury of after you dominate the brand/space.
that said, I tend to share everything knowledge related and not worry about it, trust to karma.
there are many forms of wealth.