Documentation Home
MySQL 8.4 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.0Mb
PDF (A4) - 40.0Mb
Man Pages (TGZ) - 258.6Kb
Man Pages (Zip) - 365.7Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


MySQL 8.4 Reference Manual  /  Installing MySQL  /  Installing MySQL on Linux

2.5 Installing MySQL on Linux

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:

Table 2.7 Linux Installation Methods and Information

Type Setup Method Additional Information
Apt Enable the MySQL Apt repository Documentation
Yum Enable the MySQL Yum repository Documentation
Zypper Enable the MySQL SLES repository Documentation
RPM Download a specific package Documentation
DEB Download a specific package Documentation
Generic Download a generic package Documentation
Source Compile from source Documentation
Docker Use the Oracle Container Registry. You can also use My Oracle Support for the MySQL Enterprise Edition. Documentation
Oracle Unbreakable Linux Network Use ULN channels Documentation

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 are also normally unable to install innovation releases, since 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”.

Note

For many Linux installations, you 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 6.3.3, “mysql.server — MySQL Server Startup Script”.