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 several options available:
Installing from a generic binary package in
.tar.gz format. See
Section 2.2, “Installing MySQL on Unix/Linux Using Generic Binaries” 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 precompiled RPM package. For more information, see Section 2.5.1, “Installing MySQL on Linux Using RPM Packages”.
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 care of the download and dependencies required to run MySQL, but the MySQL version will often be some versions behind the currently available release. You will also normally be unable to install development 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 Managers”.
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
under the MySQL installation directory or in a MySQL source tree.
You can install it as
automatic MySQL startup and shutdown. See
Section 2.12.3, “Starting and Stopping MySQL Automatically”.