Documentation Home
MySQL Installation Guide
Related Documentation Download this Excerpt

MySQL Installation Guide  /  Installing MySQL on Linux

Chapter 7 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 7.1 Linux Installation Methods and Information

TypeSetup MethodAdditional Information
AptEnable the MySQL Apt repositoryDocumentation
YumEnable the MySQL Yum repositoryDocumentation
ZypperEnable the MySQL SLES repositoryDocumentation
RPMDownload a specific packageDocumentation
DEBDownload a specific packageDocumentation
GenericDownload a generic packageDocumentation
SourceCompile from sourceDocumentation
DockerUse Docker HubDocumentation
Oracle Unbreakable Linux NetworkUse ULN channelsDocumentation

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 7.8, “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 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 mysql.server — MySQL Server Startup Script.

User Comments
Sign Up Login You must be logged in to post a comment.