Linux supports a number of different solutions for installing MySQL. The recommended method is to use one of the distributions from Oracle. If you choose this method, there are three options available:
Installing from a generic binary package in
.tar.gz
format. See Section 2.2, “Installing MySQL from Generic Binaries on Unix/Linux” for more information.Extracting and compiling MySQL from a source distribution. For detailed instructions, see Section 2.11, “Installing MySQL from Source”.
Installing using a pre-compiled RPM package. For more information on using the RPM solution, see Section 2.5.1, “Installing MySQL from RPM Packages on Linux”.
As an alternative, you can use the native package manager within your Linux distribution to automatically download and install MySQL for you. Native package installations can take of the download and depdendencies required to run MySQL, but the MySQL version will often be some way behind the currently available release. You will also normally be unable to install developmental releases, as these are not usually made available in the native repository. For more information on using the native package installers, see Section 2.5.2, “Installing MySQL on Linux using Native Package Manager”.
For many Linux installations, you will want to set up MySQL to be
started automatically when your machine starts. Many of the native
package installations perform this operation for you, but for
source, binary and RPM solutions you may need to set this up
separately. The required script, mysql.server,
can be found in the support-files
directory
under the MySQL installation directory or in a MySQL source tree.
You can install it as /etc/init.d/mysql
for
automatic MySQL startup and shutdown. See
Section 2.12.1.2, “Starting and Stopping MySQL Automatically”.