Table of Contents [+/-]
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.gzformat. For details, see Chapter 3, Installing MySQL on Unix/Linux Using Generic Binaries.
Extracting and compiling MySQL from a source distribution. For details, see Chapter 4, Installing MySQL from Source.
Installing using a precompiled RPM package. For details, see Section 7.1, “Installing MySQL on Linux Using RPM Packages”.
Installing using a precompiled Debian package. For details, see Section 7.2, “Installing MySQL on Linux Using Debian Packages”.
Deploying MySQL Server with Docker. For details, see Section 7.3, “Deploying MySQL on Linux with Docker”
Installing using Oracle's Unbreakable Linux Network (ULN). For details, see Installing MySQL Using Unbreakable Linux Network (ULN).
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 7.4, “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
mysql.server — MySQL Server Startup Script.