11.4 Compiling MySQL from a Source Distribution
The discussion of MySQL installation earlier in this chapter concentrates on using binary (precompiled) distributions containing ready-to-run programs. There are several advantages to using binary distributions from MySQL AB, aside from the obvious one that you need not go through a possibly somewhat lengthy build process. One significant advantage is that binaries produced by MySQL are likely to provide better performance than those you build yourself:
MySQL AB has a great deal of experience selecting configuration options such as compiler switches that produce the most highly optimized binaries. In many cases, MySQL AB uses commercial compilers that produce superior quality code compared to the compilers typically available for general-purpose use. In some cases, MySQL AB produces binaries compiled with libraries that provide capabilities beyond those available in the standard operating system vendor libraries. For example, on Linux systems, a special C library is used that allows a higher maximum number of concurrent connections than can be achieved using the stock C library. Other times, binaries are built using special libraries that work around known bugs in vendor libraries.
Despite these advantages of precompiled distributions, there are reasons you might choose to compile MySQL yourself using a source distribution:
There might be no binary distribution available for your platform. In this case, you have no choice but to build MySQL from source. You need to enable a feature that might not be available in a precompiled distribution, such as full debugging support. Or you might want to disable a feature that you don't need, to produce a server that uses less memory when it runs. Binary distributions are available only for released versions, not for the very latest development source code. If you want to run a server built from the current source, you must compile it yourself.
Should you decide to build MySQL from source, always remember to consult the MySQL Reference Manual. The manual has extensive notes and information on platform-specific issues.
|