Linux supports a number of different solutions for installing MySQL. We recommend that you use one of the distributions from Oracle, for which several methods for installation are available:
Installing with Yum using the MySQL Yum repository. For details, see Section 2.5.1, “Installing MySQL on Linux Using the MySQL Yum Repository”.
Installing with APT using the MySQL APT Repository. For details, see Section 2.5.3, “Installing MySQL on Linux Using the MySQL APT Repository”.
Installing with Zypper using the MySQL SLES Repository. For details, see Section 2.5.4, “Installing MySQL on Linux Using the MySQL SLES Repository”.
Installing using a precompiled RPM package. For more information, see Section 2.5.5, “Installing MySQL on Linux Using RPM Packages”.
Installing using a precompiled Debian package. For more information, see Section 2.5.6, “Installing MySQL on Linux Using Debian Packages from Oracle”.
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.8, “Installing MySQL from Source”.
As an alternative, you can use the package manager on your system to automatically download and install MySQL with packages from the native software repositories of your Linux distribution. These native packages are often several versions behind the currently available release. You will also normally be unable to install development milestone releases (DMRs), as these are not usually made available in the native repositories. For more information on using the native package installers, see Section 2.5.7, “Installing MySQL on Linux from the Native Software Repositories”.
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 4.3.3, “mysql.server — MySQL Server Startup Script”.