<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h2 class="title">
      <a name="updating-yum-repo">
      </a>
      3.8 Upgrading MySQL with the MySQL Yum Repository
     </h2>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045325983968">
  </a>
  <a class="indexterm" name="idm46045325982928">
  </a>
  <p>
   For supported Yum-based platforms (see
   <a class="xref" href="linux-installation-yum-repo.html" title="2.5.1 Installing MySQL on Linux Using the MySQL Yum Repository">
    Section 2.5.1, “Installing MySQL on Linux Using the MySQL Yum Repository”
   </a>
   , for a list), you
      can perform an in-place upgrade for MySQL (that is, replacing the
      old version and then running the new version using the old data
      files) with the MySQL Yum repository.
  </p>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Notes
   </div>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       An innovation series, such as MySQL
            9.1, is in a separate track than an
            LTS series, such as MySQL 8.4. The LTS
            series is active by default.
      </p>
     </li>
     <li class="listitem">
      <p>
       Before performing any update to MySQL, follow carefully the
            instructions in
       <a class="xref" href="upgrading.html" title="Chapter 3 Upgrading MySQL">
        Chapter 3,
        <i>
         Upgrading MySQL
        </i>
       </a>
       . Among other
            instructions discussed there, it is especially important to
            back up your database before the update.
      </p>
     </li>
     <li class="listitem">
      <p>
       The following instructions assume you have installed MySQL
            with the MySQL Yum repository or with an RPM package
            directly downloaded from
       <a class="ulink" href="https://dev.mysql.com/downloads/" target="_top">
        MySQL Developer
            Zone's MySQL Download page
       </a>
       ; if that is not the
            case, following the instructions in
       <a class="xref" href="linux-installation-yum-repo.html#linux-installation-yum-repo-replace-third-party" title="Replacing a Native Third-Party Distribution of MySQL">
        Replacing a Native Third-Party Distribution of MySQL
       </a>
       .
      </p>
     </li>
    </ul>
   </div>
  </div>
  <div class="orderedlist">
   <ol class="orderedlist" type="1">
    <li class="listitem">
     <h3>
      <a name="idm46045325972064">
      </a>
      Selecting a Target Series
     </h3>
     <p>
      By default, the MySQL Yum repository updates MySQL to the
          latest version in the release track you have chosen during
          installation (see
      <a class="xref" href="linux-installation-yum-repo.html#yum-repo-select-series" title="Selecting a Release Series">
       Selecting a Release Series
      </a>
      for
          details), which means, for example, a 8.0.x
          installation is
      <span class="emphasis">
       <em>
        not
       </em>
      </span>
      updated to a
          8.4.x release automatically. To update to
          another release series, you must first disable the
          subrepository for the series that has been selected (by
          default, or by yourself) and enable the subrepository for your
          target series. To do that, see the general instructions given
          in
      <a class="xref" href="linux-installation-yum-repo.html#yum-repo-select-series" title="Selecting a Release Series">
       Selecting a Release Series
      </a>
      for editing the
          subrepository entries in the
      <code class="filename">
       /etc/yum.repos.d/mysql-community.repo
      </code>
      file.
     </p>
     <p>
      As a general rule, to upgrade from one bugfix series to
          another, go to the next bugfix series rather than skipping a
          bugfix series. For example, if you are currently running MySQL
          5.7 and wish to upgrade to MySQL
          8.4, upgrade to MySQL 8.0
          first before upgrading to MySQL 8.4. For
          additional details, see
      <a class="xref" href="upgrading-from-previous-series.html" title="3.5 Changes in MySQL 8.4">
       Section 3.5, “Changes in MySQL 8.4”
      </a>
      .
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: disc; ">
       <li class="listitem">
        <p>
         For important information about upgrading from MySQL
              5.7 to 8.0,
              see
         <a class="ulink" href="/doc/refman/8.0/en/upgrading-from-previous-series.html" target="_top">
          Upgrading
              from MySQL 5.7 to
              8.0
         </a>
         .
        </p>
       </li>
       <li class="listitem">
        <p>
         For important information about upgrading from MySQL
              8.0 to 8.4, see
         <a class="ulink" href="/doc/refman/8.4/en/upgrading-from-previous-series.html" target="_top">
          Upgrading
              from MySQL 8.0 to
              8.4
         </a>
         .
        </p>
       </li>
       <li class="listitem">
        <p>
         In-place downgrading of MySQL is not supported by the
              MySQL Yum repository. Follow the instructions in
         <a class="xref" href="downgrading.html" title="Chapter 4 Downgrading MySQL">
          Chapter 4,
          <i>
           Downgrading MySQL
          </i>
         </a>
         .
        </p>
       </li>
      </ul>
     </div>
    </li>
    <li class="listitem">
     <h3>
      <a name="idm46045325959712">
      </a>
      Upgrading MySQL
     </h3>
     <p>
      Upgrade MySQL components using standard yum (or dnf) commands,
          such as MySQL Server:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa9298411"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">sudo yum update mysql-server</code></pre>
     </div>
     <p>
      For platforms that are dnf-enabled:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa37572123"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">sudo dnf upgrade mysql-server</code></pre>
     </div>
     <p>
      Alternatively, you can update MySQL by telling Yum to update
          everything on your system, which might take considerably more
          time. For platforms that are not dnf-enabled:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa80406770"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">sudo yum update</code></pre>
     </div>
     <p>
      For platforms that are dnf-enabled:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa30615317"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">sudo dnf upgrade</code></pre>
     </div>
     <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
      <div class="admon-title">
       Note
      </div>
      <p>
       The MySQL server always restarts after an update by Yum.
      </p>
     </div>
    </li>
   </ol>
  </div>
  <p>
   You can also update only a specific component. Use the following
      command to list all the installed packages for the MySQL
      components (for dnf-enabled systems, replace
   <span class="command">
    <strong>
     yum
    </strong>
   </span>
   in the command with
   <span class="command">
    <strong>
     dnf
    </strong>
   </span>
   ):
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa83627872"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">sudo yum list installed | grep <span class="token atrule">"^mysql"</span></code></pre>
  </div>
  <p>
   After identifying the package name of the component of your
      choice, update the package with the following command, replacing
   <em class="replaceable">
    <code>
     package-name
    </code>
   </em>
   with the name of the
      package. For platforms that are not dnf-enabled:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa46294033"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">sudo yum update <em class="replaceable">package-name</em></code></pre>
  </div>
  <p>
   For dnf-enabled platforms:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa68697740"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal">sudo dnf upgrade <em class="replaceable">package-name</em></code></pre>
  </div>
  <h3>
   <a name="updating-yum-repo-client-lib">
   </a>
   Upgrading the Shared Client Libraries
  </h3>
  <p>
   After updating MySQL using the Yum repository, applications
      compiled with older versions of the shared client libraries should
      continue to work.
  </p>
  <p>
   <span class="emphasis">
    <em>
     If you recompile applications and dynamically link them
      with the updated libraries:
    </em>
   </span>
   As typical with new
      versions of shared libraries where there are differences or
      additions in symbol versioning between the newer and older
      libraries (for example, between the newer, standard
      8.4 shared client libraries and some
      older—prior or variant—versions of the shared
      libraries shipped natively by the Linux distributions' software
      repositories, or from some other sources), any applications
      compiled using the updated, newer shared libraries require those
      updated libraries on systems where the applications are deployed.
      As expected, if those libraries are not in place, the applications
      requiring the shared libraries fail. For this reason, be sure to
      deploy the packages for the shared libraries from MySQL on those
      systems. To do this, add the MySQL Yum repository to the systems
      (see
   <a class="xref" href="linux-installation-yum-repo.html#yum-repo-setup" title="Adding the MySQL Yum Repository">
    Adding the MySQL Yum Repository
   </a>
   ) and install the latest
      shared libraries using the instructions given in
   <a class="xref" href="linux-installation-yum-repo.html#yum-install-components" title="Installing Additional MySQL Products and Components with Yum">
    Installing Additional MySQL Products and Components with Yum
   </a>
   .
  </p>
 </div>
 <br/>
</div>
