Documentation Home
MySQL 9.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.0Mb
PDF (A4) - 40.1Mb
Man Pages (TGZ) - 259.0Kb
Man Pages (Zip) - 366.2Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


MySQL 9.0 Reference Manual  /  ...  /  Installing MySQL on Linux Using the MySQL APT Repository

2.5.2 Installing MySQL on Linux Using the MySQL APT Repository

This section provides guidance on installing MySQL using the MySQL APT repository.

Steps for a Fresh Installation of MySQL

Note

The following instructions assume that no version of MySQL (whether distributed by Oracle or other parties) has already been installed on your system; if that is not the case, follow the instructions given in Replacing a Native Distribution of MySQL Using the MySQL APT Repository or Replacing a MySQL Server Installed by a Direct deb Package Download instead.

Adding the MySQL Apt Repository.  First, add the MySQL APT repository to your system's software repository list. Follow these steps:

  1. Go to the download page for the MySQL APT repository at https://dev.mysql.com/downloads/repo/apt/.

  2. Select and download the release package for your Linux distribution.

    Although this is not required for each update, it does update MySQL repository information to include the current information, which includes adding a new LTS series.

  3. Install the downloaded release package with the following command, replacing version-specific-package-name with the name of the downloaded package (preceded by its path, if you are not running the command inside the folder where the package is):

    $> sudo dpkg -i /PATH/version-specific-package-name.deb

    For example, for version w.x.y-z of the package, the command is:

    $> sudo dpkg -i mysql-apt-config_w.x.y-z_all.deb

    Note that the same package works on all supported Debian and Ubuntu platforms.

  4. During the installation of the package, you will be asked to choose the versions of the MySQL server and other components (for example, the MySQL Workbench) that you want to install. If you are not sure which version to choose, do not change the default options selected for you. You can also choose none if you do not want a particular component to be installed. After making the choices for all components, choose Ok to finish the configuration and installation of the release package.

    Note

    The innovation track, which includes MySQL 9.1, contains "-innovation-" in the component name.

    You can always change your choices for the versions later; see Selecting a Major Release Version for instructions.

  5. Update package information from the MySQL APT repository with the following command (this step is mandatory):

    $> sudo apt-get update

Instead of using the release package, you can also add and configure the MySQL APT repository manually; see Appendix A: Adding and Configuring the MySQL APT Repository Manually for details.

Note

Once the MySQL APT repository is enabled on your system, you will no longer be able to install any MySQL packages from your platform's native software repositories until the MySQL APT repository is disabled.

Note

Once the MySQL APT repository is enabled on your system, any system-wide upgrade by the apt-get upgrade command will automatically upgrade the MySQL packages on your system and also replace any native MySQL packages you installed from your Linux distribution's software repository, if APT finds replacements for them from within the MySQL APT repository.