<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h2 class="title">
      <a name="upgrade-best-practices">
      </a>
      3.3 Upgrade Best Practices
     </h2>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045326315808">
  </a>
  <p>
   MySQL supports upgrading between minor versions (within an LTS
    series) and to the next major version (across an LTS series).
    Upgrading provides the latest features, performance, and security
    fixes.
  </p>
  <p>
   To prepare and help ensure that your upgrade to the latest MySQL
    release is successful, we recommend the following best practices:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="xref" href="upgrade-best-practices.html#upgrade-best-practices-version" title="Decide on Major or Minor Version for Upgrade">
       Decide on Major or Minor Version for Upgrade
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="upgrade-best-practices.html#upgrade-best-practices-type" title="Decide on Upgrade Type">
       Decide on Upgrade Type
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="upgrade-best-practices.html#upgrade-best-practices-platform" title="Review Supported Platforms">
       Review Supported Platforms
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="upgrade-best-practices.html#upgrade-best-practices-changes" title="Understand MySQL Server Changes">
       Understand MySQL Server Changes
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="upgrade-best-practices.html#upgrade-best-practices-check" title="Run Upgrade Checker and Fix Incompatibilities">
       Run Upgrade Checker and Fix Incompatibilities
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="upgrade-best-practices.html#upgrade-best-practices-test" title="Run Applications in a Test Environment">
       Run Applications in a Test Environment
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="upgrade-best-practices.html#upgrade-best-practices-benchmark" title="Benchmark Applications and Workload Performance">
       Benchmark Applications and Workload Performance
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="upgrade-best-practices.html#upgrade-best-practices-compare" title="Run Both MySQL Versions in Parallel">
       Run Both MySQL Versions in Parallel
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="upgrade-best-practices.html#upgrade-best-practices-final-test" title="Run Final Test Upgrade">
       Run Final Test Upgrade
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="upgrade-best-practices.html#upgrade-best-practices-backup" title="Check MySQL Backup">
       Check MySQL Backup
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="upgrade-best-practices.html#upgrade-best-practices-production" title="Upgrade Production Server">
       Upgrade Production Server
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="upgrade-best-practices.html#upgrade-best-practices-support" title="Enterprise Support">
       Enterprise Support
      </a>
     </p>
    </li>
   </ul>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="upgrade-best-practices-version">
       </a>
       Decide on Major or Minor Version for Upgrade
      </h3>
     </div>
    </div>
   </div>
   <p>
    The MySQL Release Model makes a distinction between LTS (Long Term
      Support) and Innovation Releases. LTS releases have 8+ years of
      support and are meant for production use. Innovation Releases
      provide users with the latest features and capabilities. Learn
      more about the
    <a class="link" href="mysql-releases.html" title="1.3 MySQL Releases: Innovation and LTS">
     MySQL Release
      Model
    </a>
    .
   </p>
   <p>
    Performing a minor version upgrade is straightforward while major
      version upgrades require strategic planning and additional testing
      before the upgrade. This guide is especially useful for major
      version upgrades.
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="upgrade-best-practices-type">
       </a>
       Decide on Upgrade Type
      </h3>
     </div>
    </div>
   </div>
   <p>
    There are three main ways to upgrade MySQL; read the associated
      documentation to determine which type of upgrade is best suited
      for your situation.
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <a class="link" href="upgrade-binary-package.html#upgrade-procedure-inplace" title="In-Place Upgrade">
        An in-place
          upgrade
       </a>
       : replacing the MySQL Server packages.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a class="link" href="upgrade-binary-package.html#upgrade-procedure-logical" title="Logical Upgrade">
        A logical
          upgrade
       </a>
       : exporting SQL from the old MySQL instance to
          the new.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a class="link" href="replication-upgrade.html" title="19.5.3 Upgrading or Downgrading a Replication Topology">
        A replication topology
          upgrade
       </a>
       : account for each server's topology role.
      </p>
     </li>
    </ul>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="upgrade-best-practices-platform">
       </a>
       Review Supported Platforms
      </h3>
     </div>
    </div>
   </div>
   <p>
    If your current operating system is not supported by the new
      version of MySQL, then plan to upgrade the operating system as
      otherwise an in-place upgrade is not supported.
   </p>
   <p>
    For a current list of supported platforms, see:
    <a class="ulink" href="https://www.mysql.com/support/supportedplatforms/database.html" target="_blank">
     https://www.mysql.com/support/supportedplatforms/database.html
    </a>
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="upgrade-best-practices-changes">
       </a>
       Understand MySQL Server Changes
      </h3>
     </div>
    </div>
   </div>
   <p>
    Each major version comes with new features, changes in behavior,
      deprecations, and removals. It is important to understand the
      impact of each of these to existing applications.
   </p>
   <p>
    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>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="upgrade-best-practices-check">
       </a>
       Run Upgrade Checker and Fix Incompatibilities
      </h3>
     </div>
    </div>
   </div>
   <p>
    MySQL Shell's
    <a class="ulink" href="/doc/mysql-shell/8.4/en/mysql-shell-utilities-upgrade.html" target="_top">
     Upgrade Checker Utility
    </a>
    detects incompatibilities between database versions that must be
      addressed before performing the upgrade. The
    <span class="command">
     <strong>
      util.checkForServerUpgrade()
     </strong>
    </span>
    function verifies
      that MySQL server instances are ready to upgrade. Connect to the
      existing MySQL server and select the MySQL Server version you plan
      to upgrade to for the utility to report issues to address prior to
      an upgrade. These include incompatibilities in data types, storage
      engines, and so on.
   </p>
   <p>
    You are ready to upgrade when the upgrade checking utility no
      longer reports any issues.
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="upgrade-best-practices-test">
       </a>
       Run Applications in a Test Environment
      </h3>
     </div>
    </div>
   </div>
   <p>
    After completing the upgrade checker's requirements, next
      test your applications on the new target MySQL server. Check for
      errors and warnings in the MySQL error log and application logs.
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="upgrade-best-practices-benchmark">
       </a>
       Benchmark Applications and Workload Performance
      </h3>
     </div>
    </div>
   </div>
   <p>
    We recommend benchmarking your own applications and workloads by
      comparing how they perform using the previous and new versions of
      MySQL. Usually, newer MySQL versions add features and improve
      performance but there are cases where an upgrade might run slower
      for specific queries. Possible issues resulting in performance
      regressions:
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       Prior server configuration is not optimal for newer version
      </p>
     </li>
     <li class="listitem">
      <p>
       Changes to data types
      </p>
     </li>
     <li class="listitem">
      <p>
       Additional storage required by Multi-byte character set
          support
      </p>
     </li>
     <li class="listitem">
      <p>
       Storage engines changes
      </p>
     </li>
     <li class="listitem">
      <p>
       Dropped or changed indexes
      </p>
     </li>
     <li class="listitem">
      <p>
       Stronger encryption
      </p>
     </li>
     <li class="listitem">
      <p>
       Stronger authentication
      </p>
     </li>
     <li class="listitem">
      <p>
       SQL optimizer changes
      </p>
     </li>
     <li class="listitem">
      <p>
       Newer version of MySQL require additional memory
      </p>
     </li>
     <li class="listitem">
      <p>
       Physical or Virtual Hardware is slower - compute or storage
      </p>
     </li>
    </ul>
   </div>
   <p>
    For related information and potential mitigation techniques, see
    <a class="ulink" href="/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-performance-regressions" target="_top">
     Valid Performance Regressions
    </a>
    .
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="upgrade-best-practices-compare">
       </a>
       Run Both MySQL Versions in Parallel
      </h3>
     </div>
    </div>
   </div>
   <p>
    To minimize risk, it is best keep the current system running while
      running the upgraded system in parallel.
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="upgrade-best-practices-final-test">
       </a>
       Run Final Test Upgrade
      </h3>
     </div>
    </div>
   </div>
   <p>
    Practice and do a run though prior to upgrading your production
      server. Thoroughly test the upgrade procedures before upgrading a
      production system.
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="upgrade-best-practices-backup">
       </a>
       Check MySQL Backup
      </h3>
     </div>
    </div>
   </div>
   <p>
    Check that the full backup exists and is viable before performing
      the upgrade.
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="upgrade-best-practices-production">
       </a>
       Upgrade Production Server
      </h3>
     </div>
    </div>
   </div>
   <p>
    You are ready to complete the upgrade.
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h3 class="title">
       <a name="upgrade-best-practices-support">
       </a>
       Enterprise Support
      </h3>
     </div>
    </div>
   </div>
   <p>
    If you're a MySQL Enterprise Edition customer, you can also contact the MySQL Support
      Team experts with any questions you may have.
   </p>
  </div>
 </div>
 <br/>
</div>
