Short answer: NO!
Especially if you're running on 64-bit SPARC processor(s). However, there should be SunOS / Solaris binaries available for MySQL. I had trouble (more than I'd care to remember) trying to build MySQL from the sources because there was no binary available for the particular version of SunOS we were running.
On the other hand, both Apache and PHP built like champs with their respective source-code distributions.