Choosing a Distribution Format

After choosing which version of MySQL to install, you should decide whether to use a binary distribution or a source distribution. In most cases, you should probably use a binary distribution, if one exists for your platform. Binary distributions are available in native format for many platforms, such as RPM packages for Linux, DMG packages for OS X, and PKG packages for Solaris. Distributions are also available in more generic formats such as Zip archives or compressed tar files.

Reasons to choose a binary distribution include the following:

  • Binary distributions generally are easier to install than source distributions.

  • To satisfy different user requirements, we provide several servers in binary distributions. mysqld is an optimized server that is a smaller, faster binary. mysqld-debug is compiled with debugging support.

    Each of these servers is compiled from the same source distribution, though with different configuration options. All native MySQL clients can connect to servers from either MySQL version.

Under some circumstances, you may be better off installing MySQL from a source distribution:

  • You want to install MySQL at some explicit location. The standard binary distributions are ready to run at any installation location, but you might require even more flexibility to place MySQL components where you want.

  • You want to configure mysqld to ensure that features are available that might not be included in the standard binary distributions. Here is a list of the most common extra options that you may want to use to ensure feature availability:

    • --with-libwrap

    • --with-named-z-libs (this is done for some of the binaries)

    • --with-debug[=full]

    For additional information, see Section 2.11.4, “MySQL Source-Configuration Options”.

  • You want to configure mysqld without some features that are included in the standard binary distributions. For example, distributions normally are compiled with support for all character sets. If you want a smaller MySQL server, you can recompile it with support for only the character sets you need.

  • You want to use the latest sources from one of the Bazaar repositories to have access to all current bugfixes. For example, if you have found a bug and reported it to the MySQL development team, the bugfix is committed to the source repository and you can access it there. The bugfix does not appear in a release until a release actually is issued.

  • You want to read (or modify) the C and C++ code that makes up MySQL. For this purpose, you should get a source distribution, because the source code is always the ultimate manual.

  • Source distributions contain more tests and examples than binary distributions.

Download this Manual
User Comments
  Posted by vikas kedia on March 25, 2004
If you choose the binary method of install from between binary and source installation method, you have to choose how you want to install the binary:
1. RPM method
2. download the tar.gz file and then just untar it

The factors to consider are:

1. The directory layout which you are comfortable with since the above two binary installation methods give two different directory layouts.

take a look at the directory layouts under the two different binary installation methods at:

2. The rpm method will give you a startup script and place it in the appropriate location (for e.g in case of redhat it is /etc/rc.d/init.d/mysql) and also make the chkconfig entries in the various run levels. But the tar.gz binary distribution method will not make a startup script and it will also not make the entries in the appropriate run levels. If you do decide to go the tar.gz binary distribution method you will need a startup script. You can see a sample script at http://www.grmtech.com/mysql/samplestartup.html

Though the 2nd point of consideration may seem like a disadvantage for the tar binary install you might want to consider deeply the tar binary installs advantage of having all the mysql related files under one directory and not spread across multiple directories.

  Posted by Krishna Srikanth M on March 14, 2012
The link given by vikas - http://www.mysql.com/doc/en/Installation_layouts.html is not active. The content is now available at following locations

1. For MySQL 5.1 - http://dev.mysql.com/doc/refman/5.1/en/installation-layouts.html
2. For MySQL 5.5 - http://dev.mysql.com/doc/refman/5.5/en/installation-layouts.html

  Posted by J Shaw on March 17, 2012
Another reason to download the source code version is if you need to install some other program that either needs certain mySQL source files or needs to be included with the mySQL compile – SphinxSE, the mySQL storage engine, for example.
Sign Up Login You must be logged in to post a comment.