<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="linux-installation-sles-repo">
      </a>
      2.5.3 Using the MySQL SLES Repository
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045330980560">
  </a>
  <p>
   The MySQL SLES repository provides RPM packages for installing and
    managing the MySQL server, client, and other components on SUSE
    Enterprise Linux Server. This section contains information on
    obtaining and installing these packages.
  </p>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h4 class="title">
       <a name="linux-installation-sles-repo-setup">
       </a>
       Adding the MySQL SLES Repository
      </h4>
     </div>
    </div>
   </div>
   <p>
    Add or update the official MySQL SLES repository for your system's
      repository list:
   </p>
   <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
    <div class="admon-title">
     Note
    </div>
    <p>
     The beginning part of the configuration file name, such as
     <code class="literal">
      mysql84
     </code>
     , describes
        the default MySQL series that is enabled for installation. In
        this case, the subrepository for MySQL 8.4 LTS
        is enabled by default. It also contains other subrepository
        versions, such as MySQL 8.0 and the MySQL
        Innovation Series.
    </p>
   </div>
   <h5>
    <a name="idm46045330974528">
    </a>
    New MySQL Repository Installation
   </h5>
   <p>
    If the MySQL repository is not yet present on the system then:
   </p>
   <div class="orderedlist">
    <ol class="orderedlist" type="1">
     <li class="listitem">
      <p>
       Go to the download page for MySQL SLES repository at
       <a class="ulink" href="https://dev.mysql.com/downloads/repo/suse/" target="_top">
        https://dev.mysql.com/downloads/repo/suse/
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       Select and download the release package for your SLES version.
      </p>
     </li>
     <li class="listitem">
      <p>
       Install the downloaded release package with the following
          command, replacing
       <em class="replaceable">
        <code>
         package-name
        </code>
       </em>
       with the name of the downloaded package:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa22509215"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> rpm <span class="token property">-Uvh</span> <em class="replaceable">package-name</em><span class="token punctuation">.</span>rpm</code></pre>
      </div>
      <p>
      </p>
      <p>
       For example, to install the SLES 15 package where
       <em class="replaceable">
        <code>
         #
        </code>
       </em>
       indicates the release number
          within a version such as
       <code class="literal">
        15-1
       </code>
       :
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa76802564"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> rpm <span class="token property">-Uvh</span> mysql84-community-release-sl15-<span class="token comment" spellcheck="true"><em class="replaceable">#</em>.noarch.rpm</span></code></pre>
      </div>
     </li>
    </ol>
   </div>
   <h5>
    <a name="idm46045330962880">
    </a>
    Update an Existing MySQL Repository Installation
   </h5>
   <p>
    If an older version is already present then update it:
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa65276604"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> zypper update mysql84-community-release</code></pre>
      </div>
     </li>
     <li class="listitem">
      <p>
       Although this is not required for each MySQL release, it does
          update MySQL repository information to include the current
          information. For example,
       <code class="filename">
        mysql84-community-release-sl15-
        <em class="replaceable">
         <code>
          7
         </code>
        </em>
        .noarch.rpm
       </code>
       is the first SUSE 15 repository configuration file that adds
          the innovation release track that begins with MySQL 8.1.
          series.
      </p>
     </li>
    </ul>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h4 class="title">
       <a name="linux-installation-sles-repo-select-series">
       </a>
       Selecting a Release Series
      </h4>
     </div>
    </div>
   </div>
   <p>
    Within the MySQL SLES repository, different release series of the
      MySQL Community Server are hosted in different subrepositories.
      The subrepository for the latest bugfix series (currently MySQL
      8.4) is enabled by default, and the
      subrepositories for all other series are disabled. Use this
      command to see all of the subrepositories in the MySQL SLES
      repository, and to see which of them are enabled or disabled:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa21149437"><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"><span class="token prompt">$&gt; </span><span class="token command">zypper</span> repos | grep mysql<span class="token punctuation">.</span>*community</code></pre>
   </div>
   <p>
    The innovation track is available for SLES 15 with entries such as
    <code class="literal">
     mysql-innovation-community
    </code>
    .
   </p>
   <p>
    To install the latest release from a specific series, before
      running the installation command, make sure that the subrepository
      for the series you want is enabled and the subrepositories for
      other series are disabled. For example, on SLES 15, to disable the
      subrepositories for MySQL 8.4 server and tools,
      which are enabled by default, use the following:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa66538456"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> zypper modifyrepo <span class="token property">-d</span> mysql-8<span class="token punctuation">.</span>4-lts-community
<span class="token prompt">$&gt; </span><span class="token command">sudo</span> zypper modifyrepo <span class="token property">-d</span> mysql-tools-community</code></pre>
   </div>
   <p>
   </p>
   <p>
    Then, enable the subrepositories for the release series you want.
      For example, to enable the Innovation track on SLES 15:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa2699645"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> zypper modifyrepo <span class="token property">-e</span> mysql-innovation-community
<span class="token prompt">$&gt; </span><span class="token command">sudo</span> zypper modifyrepo <span class="token property">-e</span> mysql-tools-innovation-community</code></pre>
   </div>
   <p>
   </p>
   <p>
    You should only enable a subrepository for one release series at
      any time.
   </p>
   <p>
    Verify that the correct subrepositories have been enabled by
      running the following command and checking its output:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa77494007"><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"><span class="token prompt">$&gt; </span><span class="token command">zypper</span> repos <span class="token property">-E</span> | grep mysql<span class="token punctuation">.</span>*community

 7 | mysql-connectors-community       | MySQL Connectors Community                  | Yes     | <span class="token punctuation">(</span>r <span class="token punctuation">)</span> Yes  | No
10 | mysql-innovation-community       | MySQL Innovation Release Community Server   | Yes     | <span class="token punctuation">(</span>r <span class="token punctuation">)</span> Yes  | No
16 | mysql-tools-innovation-community | MySQL Tools Innovation Community            | Yes     | <span class="token punctuation">(</span> p<span class="token punctuation">)</span> Yes  | No</code></pre>
   </div>
   <p>
   </p>
   <p>
    After that, use the following command to refresh the repository
      information for the enabled subrepository:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa5811415"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> zypper refresh</code></pre>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h4 class="title">
       <a name="linux-installation-sles-repo-install-zypper">
       </a>
       Installing MySQL with Zypper
      </h4>
     </div>
    </div>
   </div>
   <p>
    With the official MySQL repository enabled, install MySQL Server:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa77726926"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> zypper install mysql-community-server</code></pre>
   </div>
   <p>
    This installs the package for the MySQL server, as well as other
      required packages.
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h4 class="title">
       <a name="linux-installation-sles-repo-start">
       </a>
       Starting the MySQL Server
      </h4>
     </div>
    </div>
   </div>
   <p>
    Start the MySQL server with the following command:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa95925525"><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"><span class="token prompt">$&gt; </span><span class="token command">systemctl</span> start mysql</code></pre>
   </div>
   <p>
    You can check the status of the MySQL server with the following
      command:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa34070568"><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"><span class="token prompt">$&gt; </span><span class="token command">systemctl</span> status mysql</code></pre>
   </div>
   <p>
    If the operating system is systemd enabled, standard
    <span class="command">
     <strong>
      systemctl
     </strong>
    </span>
    (or alternatively,
    <span class="command">
     <strong>
      service
     </strong>
    </span>
    with the arguments reversed) commands
      such as
    <span class="command">
     <strong>
      stop
     </strong>
    </span>
    ,
    <span class="command">
     <strong>
      start
     </strong>
    </span>
    ,
    <span class="command">
     <strong>
      status
     </strong>
    </span>
    , and
    <a class="link" href="restart.html" title="15.7.8.8 RESTART Statement">
     <span class="command">
      <strong>
       restart
      </strong>
     </span>
    </a>
    should
      be used to manage the MySQL server service. The
    <code class="literal">
     mysql
    </code>
    service is enabled by default, and it
      starts at system reboot. See
    <a class="xref" href="using-systemd.html" title="2.5.9 Managing MySQL Server with systemd">
     Section 2.5.9, “Managing MySQL Server with systemd”
    </a>
    for
      additional information.
   </p>
   <p>
    <span class="emphasis">
     <em>
      MySQL Server Initialization:
     </em>
    </span>
    When the server
      is started for the first time, the server is initialized, and the
      following happens (if the data directory of the server is empty
      when the initialization process begins):
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       The SSL certificate and key files are generated in the data
          directory.
      </p>
     </li>
     <li class="listitem">
      <p>
       The
       <a class="link" href="validate-password.html" title="8.4.3 The Password Validation Component">
        validate_password
          plugin
       </a>
       is installed and enabled.
      </p>
     </li>
     <li class="listitem">
      <p>
       A superuser account
       <code class="literal">
        'root'@'localhost'
       </code>
       is
          created. A password for the superuser is set and stored in the
          error log file. To reveal it, use the following command:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa71192636"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> grep <span class="token atrule">'temporary password'</span> /var/log/mysql/mysqld<span class="token punctuation">.</span>log</code></pre>
      </div>
      <p>
       Change the root password as soon as possible by logging in
          with the generated, temporary password and set a custom
          password for the superuser account:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa33371922"><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"><span class="token prompt">$&gt; </span><span class="token command">mysql</span> <span class="token property">-uroot</span> <span class="token property">-p</span></code></pre>
      </div>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa38735563"><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-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">ALTER</span> <span class="token keyword">USER</span> <span class="token string">'root'</span>@<span class="token string">'localhost'</span> <span class="token keyword">IDENTIFIED</span> <span class="token keyword">BY</span> <span class="token string">'MyNewPass4!'</span><span class="token punctuation">;</span></code></pre>
      </div>
     </li>
    </ul>
   </div>
   <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
    <div class="admon-title">
     Note
    </div>
    <p>
     MySQL's
     <a class="link" href="validate-password.html" title="8.4.3 The Password Validation Component">
      validate_password
     </a>
     plugin is installed by default. This will require that passwords
        contain at least one uppercase letter, one lowercase letter, one
        digit, and one special character, and that the total password
        length is at least 8 characters.
    </p>
   </div>
   <p>
    You can stop the MySQL Server with the following command:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa30026025"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> systemctl stop mysql</code></pre>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h4 class="title">
       <a name="linux-installation-sles-repo-components">
       </a>
       Installing Additional MySQL Products and Components
      </h4>
     </div>
    </div>
   </div>
   <p>
    You can install more components of MySQL. List subrepositories in
      the MySQL SLES repository with the following command:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa23022760"><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"><span class="token prompt">$&gt; </span><span class="token command">zypper</span> repos | grep mysql<span class="token punctuation">.</span>*community</code></pre>
   </div>
   <p>
    Use the following command to list the packages for the MySQL
      components available for a certain subrepository, changing
    <em class="replaceable">
     <code>
      subrepo-name
     </code>
    </em>
    to the name of the
      subrepository you are interested in :
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa57059132"><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"><span class="token prompt">$&gt; </span><span class="token command">zypper</span> packages <em class="replaceable">subrepo-name</em></code></pre>
   </div>
   <p>
    Install any packages of your choice with the following command,
      replacing
    <em class="replaceable">
     <code>
      package-name
     </code>
    </em>
    with name of the
      package (you might need to enable first the subrepository for the
      package, using the same method for selecting a subrepository for a
      specific release series outlined in
    <a class="xref" href="linux-installation-sles-repo.html#linux-installation-sles-repo-select-series" title="Selecting a Release Series">
     Selecting a Release Series
    </a>
    ):
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa81002157"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> zypper install <em class="replaceable">package-name</em></code></pre>
   </div>
   <p>
    For example, to install the MySQL benchmark suite from the
      subrepository for the release series you have already enabled:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa40070394"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> zypper install mysql-community-bench</code></pre>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h4 class="title">
       <a name="linux-installation-sles-repo-upgrading">
       </a>
       Upgrading MySQL with the MySQL SLES Repository
      </h4>
     </div>
    </div>
   </div>
   <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
    <div class="admon-title">
     Note
    </div>
    <div class="itemizedlist">
     <ul class="itemizedlist" style="list-style-type: disc; ">
      <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>
     </ul>
    </div>
   </div>
   <p>
    Use the MySQL SLES repository to perform an in-place update (that
      is, replacing the old version of the server and then running the
      new version using the old data files) for your MySQL installation
      by following these steps (they assume you have installed MySQL
      with the MySQL SLES repository; if that is not the case, following
      the instructions in
    <a class="xref" href="linux-installation-sles-repo.html#linux-installation-sles-repo-replacing" title="Replacing MySQL Installed by an RPM from Other Sources">
     Replacing MySQL Installed by an RPM from Other Sources
    </a>
    instead):
   </p>
   <div class="orderedlist">
    <ol class="orderedlist" type="1">
     <li class="listitem">
      <h5>
       <a name="idm46045330889824">
       </a>
       Selecting a Target Series
      </h5>
      <p>
       During an update operation, by default, the MySQL SLES
            repository updates MySQL to the latest version in the
            release series you have chosen during installation (see
       <a class="xref" href="linux-installation-sles-repo.html#linux-installation-sles-repo-select-series" title="Selecting a Release Series">
        Selecting a Release Series
       </a>
       for details), which means. For example, a bugfix series
            installation, such as 8.4, will
       <span class="emphasis">
        <em>
         not
        </em>
       </span>
       update to an innovation series,
            such as 9.1. To update to another
            release series, you need to 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, follow the general instructions given in
       <a class="xref" href="linux-installation-sles-repo.html#linux-installation-sles-repo-select-series" title="Selecting a Release Series">
        Selecting a Release Series
       </a>
       .
      </p>
      <p>
       As a general rule, to upgrade from one release series to
            another, go to the next series rather than skipping a
            series.
      </p>
      <div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
       <div class="admon-title">
        Important
       </div>
       <p>
        In-place downgrading of MySQL is not supported by the
              MySQL SLES repository. Follow the instructions in
        <a class="xref" href="downgrading.html" title="Chapter 4 Downgrading MySQL">
         Chapter 4,
         <i>
          Downgrading MySQL
         </i>
        </a>
        .
       </p>
      </div>
     </li>
     <li class="listitem">
      <h5>
       <a name="idm46045330883584">
       </a>
       Upgrading MySQL
      </h5>
      <p>
       Upgrade MySQL and its components by the following command:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa98107235"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> zypper update mysql-community-server</code></pre>
      </div>
      <p>
       Alternatively, you can update MySQL by telling Zypper to
            update everything on your system (this might take
            considerably more time):
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa31242405"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> zypper update</code></pre>
      </div>
      <p>
      </p>
     </li>
    </ol>
   </div>
   <p>
   </p>
   <p>
    You can also update a specific component only. Use the following
      command to list all the installed packages from the MySQL SLES
      repository:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa37915487"><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"><span class="token prompt">$&gt; </span><span class="token command">zypper</span> packages <span class="token property">-i</span> | grep mysql-<span class="token punctuation">.</span>*community</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:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa33586225"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> zypper update <em class="replaceable">package-name</em></code></pre>
   </div>
   <p>
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h4 class="title">
       <a name="linux-installation-sles-repo-replacing">
       </a>
       Replacing MySQL Installed by an RPM from Other Sources
      </h4>
     </div>
    </div>
   </div>
   <p>
    RPMs for installing the MySQL Community Server and its components
      can be downloaded from MySQL either from the
    <a class="ulink" href="https://dev.mysql.com/downloads/" target="_top">
     MySQL Developer Zone
    </a>
    ,
      from the native software repository of SLES, or from the MySQL
      SLES repository. The RPMs from the those sources might be
      different, and they might install and configure MySQL in different
      ways.
   </p>
   <p>
    If you have installed MySQL with RPMs from the MySQL Developer
      Zone or the native software repository of SLES and want to replace
      the installation using the RPM from the MySQL SLES repository,
      follow these steps:
   </p>
   <div class="orderedlist">
    <ol class="orderedlist" type="1">
     <li class="listitem">
      <p>
       Back up your database to avoid data loss. See
       <a class="xref" href="backup-and-recovery.html" title="Chapter 9 Backup and Recovery">
        Chapter 9,
        <i>
         Backup and Recovery
        </i>
       </a>
       on how to do that.
      </p>
     </li>
     <li class="listitem">
      <p>
       Stop your MySQL Server, if it is running. If the server is
            running as a service, you can stop it with the following
            command:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa23313619"><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"><span class="token prompt">$&gt; </span><span class="token command">systemctl</span> stop mysql</code></pre>
      </div>
      <p>
      </p>
     </li>
     <li class="listitem">
      <p>
       Follow the steps given for
       <a class="xref" href="linux-installation-sles-repo.html#linux-installation-sles-repo-setup" title="Adding the MySQL SLES Repository">
        Adding the MySQL SLES Repository
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       Follow the steps given for
       <a class="xref" href="linux-installation-sles-repo.html#linux-installation-sles-repo-select-series" title="Selecting a Release Series">
        Selecting a Release Series
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       Follow the steps given for
       <a class="xref" href="linux-installation-sles-repo.html#linux-installation-sles-repo-install-zypper" title="Installing MySQL with Zypper">
        Installing MySQL with Zypper
       </a>
       .
            You will be asked if you want to replace the old packages
            with the new ones; for example:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa68289778"><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">Problem<span class="token punctuation">:</span> mysql-community-server-5<span class="token punctuation">.</span>6<span class="token punctuation">.</span>22-2<span class="token punctuation">.</span>sles11<span class="token punctuation">.</span>x86_64 requires mysql<span class="token constant">-community-client</span> = 5<span class="token punctuation">.</span>6<span class="token punctuation">.</span>22-2<span class="token punctuation">.</span>sles11<span class="token punctuation">,</span>
  but this requirement cannot be provided uninstallable providers<span class="token punctuation">:</span>
  mysql-community-client-5<span class="token punctuation">.</span>6<span class="token punctuation">.</span>22-2<span class="token punctuation">.</span>sles11<span class="token punctuation">.</span>x86_64<span class="token punctuation">[</span>mysql56-community<span class="token punctuation">]</span>
 Solution 1<span class="token punctuation">:</span> replacement of mysql-client-5<span class="token punctuation">.</span>5<span class="token punctuation">.</span>31-0<span class="token punctuation">.</span>7<span class="token punctuation">.</span>10<span class="token punctuation">.</span>x86_64 with mysql-community-client-5<span class="token punctuation">.</span>6<span class="token punctuation">.</span>22-2<span class="token punctuation">.</span>sles11<span class="token punctuation">.</span>x86_64
 Solution 2<span class="token punctuation">:</span> do not install mysql-community-server-5<span class="token punctuation">.</span>6<span class="token punctuation">.</span>22-2<span class="token punctuation">.</span>sles11<span class="token punctuation">.</span>x86_64
 Solution 3<span class="token punctuation">:</span> break mysql-community-server-5<span class="token punctuation">.</span>6<span class="token punctuation">.</span>22-2<span class="token punctuation">.</span>sles11<span class="token punctuation">.</span>x86_64 by ignoring some of its dependencies

Choose from above solutions by number or cancel <span class="token punctuation">[</span>1/2/3/c<span class="token punctuation">]</span> <span class="token punctuation">(</span>c<span class="token punctuation">)</span></code></pre>
      </div>
      <p>
       Choose the
       <span class="quote">
        “
        <span class="quote">
         replacement
        </span>
        ”
       </span>
       option
            (
       <span class="quote">
        “
        <span class="quote">
         Solution 1
        </span>
        ”
       </span>
       in the example) to finish your
            installation from the MySQL SLES repository.
      </p>
     </li>
    </ol>
   </div>
   <p>
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h4 class="title">
       <a name="linux-installation-sles-repo-ndb-cluster">
       </a>
       Installing MySQL NDB Cluster Using the SLES Repository
      </h4>
     </div>
    </div>
   </div>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       The following instructions assume that neither the MySQL
          Server nor MySQL NDB Cluster has already been installed on
          your system; if that is not the case, remove the MySQL Server
          or MySQL NDB Cluster, including all its executables,
          libraries, configuration files, log files, and data
          directories, before you continue. However there is no need to
          remove the release package you might have used to enable the
          MySQL SLES repository on your system.
      </p>
     </li>
     <li class="listitem">
      <p>
       The NDB Cluster Auto-Installer package has a dependency on the
       <code class="literal">
        python2-crypto
       </code>
       and
       <code class="literal">
        python-paramiko
       </code>
       packages. Zypper can take
          care of this dependency if the Python repository has been
          enabled on your system.
      </p>
     </li>
    </ul>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h4 class="title">
       <a name="linux-installation-sles-repo-ndb">
       </a>
       Selecting the MySQL NDB Cluster Subrepository
      </h4>
     </div>
    </div>
   </div>
   <p>
    Within the MySQL SLES repository, the MySQL Community Server and
      MySQL NDB Cluster are hosted in different subrepositories. By
      default, the subrepository for the latest bugfix series of the
      MySQL Server is enabled and the subrepository for MySQL NDB
      Cluster is disabled. To install NDB Cluster, disable the
      subrepository for the MySQL Server and enable the subrepository
      for NDB Cluster. For example, disable the subrepository for MySQL
      8.4, which is enabled by default, with the
      following command:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa50117029"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> zypper modifyrepo <span class="token property">-d</span> mysql-8<span class="token punctuation">.</span>4-lts-community</code></pre>
   </div>
   <p>
    Then, enable the subrepository for MySQL NDB Cluster:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa87628172"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> zypper modifyrepo <span class="token property">-e</span> mysql-cluster-8<span class="token punctuation">.</span>4-community</code></pre>
   </div>
   <p>
    Verify that the correct subrepositories have been enabled by
      running the following command and checking its output:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa43410207"><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"><span class="token prompt">$&gt; </span><span class="token command">zypper</span> repos <span class="token property">-E</span> | grep mysql<span class="token punctuation">.</span>*community
10 | mysql-cluster-8<span class="token punctuation">.</span>4-community | MySQL Cluster 8<span class="token punctuation">.</span>4 Community | Yes     | No</code></pre>
   </div>
   <p>
    After that, use the following command to refresh the repository
      information for the enabled subrepository:
   </p>
   <div class="copytoclipboard-wrapper">
    <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa83839600"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> zypper refresh</code></pre>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h4 class="title">
       <a name="linux-installation-sles-repo-cluster-install">
       </a>
       Installing MySQL NDB Cluster
      </h4>
     </div>
    </div>
   </div>
   <p>
    For a minimal installation of MySQL NDB Cluster, follow these
      steps:
   </p>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       Install the components for SQL nodes:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa96759395"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> zypper install mysql-cluster-community-server</code></pre>
      </div>
      <p>
       After the installation is completed, start and initialize the
          SQL node by following the steps given in
       <a class="xref" href="linux-installation-sles-repo.html#linux-installation-sles-repo-start" title="Starting the MySQL Server">
        Starting the MySQL Server
       </a>
       .
      </p>
      <p>
       If you choose to initialize the data directory manually using
          the
       <code class="literal">
        mysqld --initialize
       </code>
       command (see
       <a class="xref" href="data-directory-initialization.html" title="2.9.1 Initializing the Data Directory">
        Section 2.9.1, “Initializing the Data Directory”
       </a>
       for details),
          a
       <code class="literal">
        root
       </code>
       password is going to be generated
          and stored in the SQL node's error log; see
       <a class="xref" href="linux-installation-sles-repo.html#linux-installation-sles-repo-start" title="Starting the MySQL Server">
        Starting the MySQL Server
       </a>
       for how
          to find the password, and for a few things you need to know
          about it.
      </p>
     </li>
    </ul>
   </div>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       Install the executables for management nodes:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa59581825"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> zypper install mysql-cluster-community-management-server</code></pre>
      </div>
     </li>
     <li class="listitem">
      <p>
       Install the executables for data nodes:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa44551386"><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"><span class="token prompt">$&gt; </span><span class="token command">sudo</span> zypper install mysql-cluster-community-data-node</code></pre>
      </div>
     </li>
    </ul>
   </div>
   <p>
    To install more NDB Cluster components, see
    <a class="xref" href="linux-installation-sles-repo.html#linux-installation-sles-repo-components" title="Installing Additional MySQL Products and Components">
     Installing Additional MySQL Products and Components
    </a>
    .
   </p>
   <p>
    See
    <a class="xref" href="mysql-cluster-install-configuration.html" title="25.3.3 Initial Configuration of NDB Cluster">
     Section 25.3.3, “Initial Configuration of NDB Cluster”
    </a>
    on how
      to configure MySQL NDB Cluster and
    <a class="xref" href="mysql-cluster-install-first-start.html" title="25.3.4 Initial Startup of NDB Cluster">
     Section 25.3.4, “Initial Startup of NDB Cluster”
    </a>
    on how to
      start it for the first time.
   </p>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h4 class="title">
       <a name="linux-installation-sles-repo-cluster-components">
       </a>
       Installing Additional MySQL NDB Cluster Products and Components
      </h4>
     </div>
    </div>
   </div>
   <p>
    You can use Zypper to install individual components and additional
      products of MySQL NDB Cluster from the MySQL SLES repository. To do that,
      assuming you already have the MySQL SLES repository on your
      system's repository list (if not, follow Step 1 and 2 of
    <a class="xref" href="linux-installation-sles-repo.html#linux-installation-sles-repo-ndb-cluster" title="Installing MySQL NDB Cluster Using the SLES Repository">
     Installing MySQL NDB Cluster Using the SLES Repository
    </a>
    ),
      follow the same steps given in
    <a class="xref" href="linux-installation-sles-repo.html#linux-installation-sles-repo-cluster-components" title="Installing Additional MySQL NDB Cluster Products and Components">
     Installing Additional MySQL NDB Cluster Products and Components
    </a>
    .
   </p>
   <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
    <div class="admon-title">
     Note
    </div>
    <p>
     <span class="emphasis">
      <em>
       Known issue:
      </em>
     </span>
     Currently, not all
          components required for running the MySQL NDB Cluster test suite are
          installed automatically when you install the test suite
          package (
     <code class="literal">
      mysql-cluster-community-test
     </code>
     ).
          Install the following packages with
     <span class="command">
      <strong>
       zypper
          install
      </strong>
     </span>
     before you run the test suite:
    </p>
    <div class="itemizedlist">
     <ul class="itemizedlist" style="list-style-type: disc; ">
      <li class="listitem">
       <p>
        <code class="literal">
         mysql-cluster-community-auto-installer
        </code>
       </p>
      </li>
      <li class="listitem">
       <p>
        <code class="literal">
         mysql-cluster-community-management-server
        </code>
       </p>
      </li>
      <li class="listitem">
       <p>
        <code class="literal">
         mysql-cluster-community-data-node
        </code>
       </p>
      </li>
      <li class="listitem">
       <p>
        <code class="literal">
         mysql-cluster-community-memcached
        </code>
       </p>
      </li>
      <li class="listitem">
       <p>
        <code class="literal">
         mysql-cluster-community-java
        </code>
       </p>
      </li>
      <li class="listitem">
       <p>
        <code class="literal">
         mysql-cluster-community-ndbclient-devel
        </code>
       </p>
      </li>
     </ul>
    </div>
   </div>
   <p>
   </p>
  </div>
 </div>
 <br/>
</div>
