<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="connection-options">
      </a>
      6.2.3 Command Options for Connecting to the Server
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045323566208">
  </a>
  <p>
   This section describes options supported by most MySQL client
      programs that control how client programs establish connections to
      the server, whether connections are encrypted, and whether
      connections are compressed. These options can be given on the
      command line or in an option file.
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <a class="xref" href="connection-options.html#connection-establishment-options" title="Command Options for Connection Establishment">
       Command Options for Connection Establishment
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="connection-options.html#encrypted-connection-options" title="Command Options for Encrypted Connections">
       Command Options for Encrypted Connections
      </a>
     </p>
    </li>
    <li class="listitem">
     <p>
      <a class="xref" href="connection-options.html#connection-compression-options" title="Command Options for Connection Compression">
       Command Options for Connection Compression
      </a>
     </p>
    </li>
   </ul>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h4 class="title">
       <a name="connection-establishment-options">
       </a>
       Command Options for Connection Establishment
      </h4>
     </div>
    </div>
   </div>
   <p>
    This section describes options that control how client programs
        establish connections to the server. For additional information
        and examples showing how to use them, see
    <a class="xref" href="connecting.html" title="6.2.4 Connecting to the MySQL Server Using Command Options">
     Section 6.2.4, “Connecting to the MySQL Server Using Command Options”
    </a>
    .
   </p>
   <div class="table">
    <a name="idm46045323558128">
    </a>
    <p class="title">
     <b>
      Table 6.4 Connection-Establishment Option Summary
     </b>
    </p>
    <div class="table-contents">
     <table frame="box" rules="all" summary="Command-line options available for establishing connections to the server.">
      <colgroup>
       <col style="width: 35%"/>
       <col style="width: 64%"/>
      </colgroup>
      <thead>
       <tr>
        <th>
         Option Name
        </th>
        <th>
         Description
        </th>
       </tr>
      </thead>
      <tbody>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_default-auth">
          --default-auth
         </a>
        </td>
        <td>
         Authentication plugin to use
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_host">
          --host
         </a>
        </td>
        <td>
         Host on which MySQL server is located
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_password">
          --password
         </a>
        </td>
        <td>
         Password to use when connecting to server
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_password1">
          --password1
         </a>
        </td>
        <td>
         First multifactor authentication password to use when connecting to server
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_password2">
          --password2
         </a>
        </td>
        <td>
         Second multifactor authentication password to use when connecting to server
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_password3">
          --password3
         </a>
        </td>
        <td>
         Third multifactor authentication password to use when connecting to server
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_pipe">
          --pipe
         </a>
        </td>
        <td>
         Connect to server using named pipe (Windows only)
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_plugin-dir">
          --plugin-dir
         </a>
        </td>
        <td>
         Directory where plugins are installed
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_port">
          --port
         </a>
        </td>
        <td>
         TCP/IP port number for connection
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_protocol">
          --protocol
         </a>
        </td>
        <td>
         Transport protocol to use
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_shared-memory-base-name">
          --shared-memory-base-name
         </a>
        </td>
        <td>
         Shared-memory name for shared-memory connections (Windows only)
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_socket">
          --socket
         </a>
        </td>
        <td>
         Unix socket file or Windows named pipe to use
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_user">
          --user
         </a>
        </td>
        <td>
         MySQL user name to use when connecting to server
        </td>
       </tr>
      </tbody>
     </table>
    </div>
    <div class="table-contents">
     <table cellpadding="0" cellspacing="0" style="position: fixed; top: 0px; display: none; left: 401px; width: 739px;">
      <thead>
       <tr>
        <th style="width: 260.906px;">
         Option Name
        </th>
        <th style="width: 477.094px;">
         Description
        </th>
       </tr>
      </thead>
     </table>
    </div>
   </div>
   <br class="table-break"/>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <a name="option_general_default-auth">
       </a>
       <a class="link" href="connection-options.html#option_general_default-auth">
        <code class="option">
         --default-auth=
         <em class="replaceable">
          <code>
           plugin
          </code>
         </em>
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for default-auth">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --default-auth=plugin
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           String
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323506704">
      </a>
      <p>
       A hint about which client-side authentication plugin to use.
            See
       <a class="xref" href="pluggable-authentication.html" title="8.2.17 Pluggable Authentication">
        Section 8.2.17, “Pluggable Authentication”
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_host">
       </a>
       <a class="link" href="connection-options.html#option_general_host">
        <code class="option">
         --host=
         <em class="replaceable">
          <code>
           host_name
          </code>
         </em>
        </code>
       </a>
       ,
       <code class="option">
        -h
        <em class="replaceable">
         <code>
          host_name
         </code>
        </em>
       </code>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for host">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --host=host_name
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           String
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            localhost
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323491136">
      </a>
      <p>
       The host on which the MySQL server is running. The value can
            be a host name, IPv4 address, or IPv6 address. The default
            value is
       <code class="literal">
        localhost
       </code>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_password">
       </a>
       <a class="link" href="connection-options.html#option_general_password">
        <code class="option">
         --password[=
         <em class="replaceable">
          <code>
           pass_val
          </code>
         </em>
         ]
        </code>
       </a>
       ,
       <code class="option">
        -p[
        <em class="replaceable">
         <code>
          pass_val
         </code>
        </em>
        ]
       </code>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for password">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --password[=password]
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           String
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            [none]
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323475360">
      </a>
      <p>
       The password of the MySQL account used for connecting to the
            server. The password value is optional. If not given, the
            client program prompts for one. If given, there must be
       <span class="emphasis">
        <em>
         no space
        </em>
       </span>
       between
       <a class="link" href="connection-options.html#option_general_password">
        <code class="option">
         --password=
        </code>
       </a>
       or
       <code class="option">
        -p
       </code>
       and the password following it. If no
            password option is specified, the default is to send no
            password.
      </p>
      <p>
       Specifying a password on the command line should be
            considered insecure. To avoid giving the password on the
            command line, use an option file. See
       <a class="xref" href="password-security-user.html" title="8.1.2.1 End-User Guidelines for Password Security">
        Section 8.1.2.1, “End-User Guidelines for Password Security”
       </a>
       .
      </p>
      <p>
       To explicitly specify that there is no password and that the
            client program should not prompt for one, use the
       <a class="link" href="connection-options.html#option_general_password">
        <code class="option">
         --skip-password
        </code>
       </a>
       option.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_password1">
       </a>
       <a class="link" href="connection-options.html#option_general_password1">
        <code class="option">
         --password1[=
         <em class="replaceable">
          <code>
           pass_val
          </code>
         </em>
         ]
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for password1">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --password1[=password]
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           String
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323458576">
      </a>
      <p>
       The password for multifactor authentication factor 1 of the
            MySQL account used for connecting to the server. The
            password value is optional. If not given, the client program
            prompts for one. If given, there must be
       <span class="emphasis">
        <em>
         no
            space
        </em>
       </span>
       between
       <a class="link" href="connection-options.html#option_general_password1">
        <code class="option">
         --password1=
        </code>
       </a>
       and the
            password following it. If no password option is specified,
            the default is to send no password.
      </p>
      <p>
       Specifying a password on the command line should be
            considered insecure. To avoid giving the password on the
            command line, use an option file. See
       <a class="xref" href="password-security-user.html" title="8.1.2.1 End-User Guidelines for Password Security">
        Section 8.1.2.1, “End-User Guidelines for Password Security”
       </a>
       .
      </p>
      <p>
       To explicitly specify that there is no password and that the
            client program should not prompt for one, use the
       <a class="link" href="connection-options.html#option_general_password1">
        <code class="option">
         --skip-password1
        </code>
       </a>
       option.
      </p>
      <p>
       <a class="link" href="connection-options.html#option_general_password1">
        <code class="option">
         --password1
        </code>
       </a>
       and
       <a class="link" href="connection-options.html#option_general_password">
        <code class="option">
         --password
        </code>
       </a>
       are synonymous,
            as are
       <a class="link" href="connection-options.html#option_general_password1">
        <code class="option">
         --skip-password1
        </code>
       </a>
       and
       <a class="link" href="connection-options.html#option_general_password">
        <code class="option">
         --skip-password
        </code>
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_password2">
       </a>
       <a class="link" href="connection-options.html#option_general_password2">
        <code class="option">
         --password2[=
         <em class="replaceable">
          <code>
           pass_val
          </code>
         </em>
         ]
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for password2">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --password2[=password]
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           String
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323437936">
      </a>
      <p>
       The password for multifactor authentication factor 2 of the
            MySQL account used for connecting to the server. The
            semantics of this option are similar to the semantics for
       <a class="link" href="connection-options.html#option_general_password1">
        <code class="option">
         --password1
        </code>
       </a>
       ; see the
            description of that option for details.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_password3">
       </a>
       <a class="link" href="connection-options.html#option_general_password3">
        <code class="option">
         --password3[=
         <em class="replaceable">
          <code>
           pass_val
          </code>
         </em>
         ]
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for password3">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --password3[=password]
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           String
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323425008">
      </a>
      <p>
       The password for multifactor authentication factor 3 of the
            MySQL account used for connecting to the server. The
            semantics of this option are similar to the semantics for
       <a class="link" href="connection-options.html#option_general_password1">
        <code class="option">
         --password1
        </code>
       </a>
       ; see the
            description of that option for details.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_pipe">
       </a>
       <a class="link" href="connection-options.html#option_general_pipe">
        <code class="option">
         --pipe
        </code>
       </a>
       ,
       <code class="option">
        -W
       </code>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for pipe">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --pipe
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           String
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323412144">
      </a>
      <p>
       On Windows, connect to the server using a named pipe. This
            option applies only if the server was started with the
       <a class="link" href="server-system-variables.html#sysvar_named_pipe">
        <code class="literal">
         named_pipe
        </code>
       </a>
       system variable
            enabled to support named-pipe connections. In addition, the
            user making the connection must be a member of the Windows
            group specified by the
       <a class="link" href="server-system-variables.html#sysvar_named_pipe_full_access_group">
        <code class="literal">
         named_pipe_full_access_group
        </code>
       </a>
       system variable.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_plugin-dir">
       </a>
       <a class="link" href="connection-options.html#option_general_plugin-dir">
        <code class="option">
         --plugin-dir=
         <em class="replaceable">
          <code>
           dir_name
          </code>
         </em>
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for plugin-dir">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --plugin-dir=dir_name
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Directory name
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323397632">
      </a>
      <p>
       The directory in which to look for plugins. Specify this
            option if the
       <a class="link" href="connection-options.html#option_general_default-auth">
        <code class="option">
         --default-auth
        </code>
       </a>
       option is used to specify an authentication plugin but the
            client program does not find it. See
       <a class="xref" href="pluggable-authentication.html" title="8.2.17 Pluggable Authentication">
        Section 8.2.17, “Pluggable Authentication”
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_port">
       </a>
       <a class="link" href="connection-options.html#option_general_port">
        <code class="option">
         --port=
         <em class="replaceable">
          <code>
           port_num
          </code>
         </em>
        </code>
       </a>
       ,
       <code class="option">
        -P
        <em class="replaceable">
         <code>
          port_num
         </code>
        </em>
       </code>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for port">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --port=port_num
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Numeric
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            3306
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323381088">
      </a>
      <p>
       For TCP/IP connections, the port number to use. The default
            port number is 3306.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_protocol">
       </a>
       <a class="link" href="connection-options.html#option_general_protocol">
        <code class="option">
         --protocol={TCP|SOCKET|PIPE|MEMORY}
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for protocol">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --protocol=type
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           String
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            [see text]
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Valid Values
          </th>
          <td>
           <p class="valid-value">
            <code class="literal">
             TCP
            </code>
           </p>
           <p class="valid-value">
            <code class="literal">
             SOCKET
            </code>
           </p>
           <p class="valid-value">
            <code class="literal">
             PIPE
            </code>
           </p>
           <p class="valid-value">
            <code class="literal">
             MEMORY
            </code>
           </p>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323361616">
      </a>
      <p>
       This option explicitly specifies which transport protocol to
            use for connecting to the server. It is useful when other
            connection parameters normally result in use of a protocol
            other than the one you want. For example, connections on
            Unix to
       <code class="literal">
        localhost
       </code>
       are made using a Unix
            socket file by default:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa80438885"><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">mysql <span class="token constant">--host</span><span class="token attr-value"><span class="token punctuation">=</span>localhost</span></code></pre>
      </div>
      <p>
       To force TCP/IP transport to be used instead, specify a
       <a class="link" href="connection-options.html#option_general_protocol">
        <code class="option">
         --protocol
        </code>
       </a>
       option:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa53770698"><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">mysql <span class="token constant">--host</span><span class="token attr-value"><span class="token punctuation">=</span>localhost</span> <span class="token constant">--protocol</span><span class="token attr-value"><span class="token punctuation">=</span>TCP</span></code></pre>
      </div>
      <p>
       The following table shows the permissible
       <a class="link" href="connection-options.html#option_general_protocol">
        <code class="option">
         --protocol
        </code>
       </a>
       option values and
            indicates the applicable platforms for each value. The
            values are not case-sensitive.
      </p>
      <div class="informaltable">
       <table summary="Permissible transport protocol values, the resulting transport protocol used, and the applicable platforms for each value.">
        <colgroup>
         <col style="width: 20%"/>
         <col style="width: 50%"/>
         <col style="width: 30%"/>
        </colgroup>
        <thead>
         <tr>
          <th scope="col">
           <a class="link" href="connection-options.html#option_general_protocol">
            <code class="option">
             --protocol
            </code>
           </a>
           Value
          </th>
          <th scope="col">
           Transport Protocol Used
          </th>
          <th scope="col">
           Applicable Platforms
          </th>
         </tr>
        </thead>
        <tbody>
         <tr>
          <th scope="row">
           <code class="literal">
            TCP
           </code>
          </th>
          <td>
           TCP/IP transport to local or remote server
          </td>
          <td>
           All
          </td>
         </tr>
         <tr>
          <th scope="row">
           <code class="literal">
            SOCKET
           </code>
          </th>
          <td>
           Unix socket-file transport to local server
          </td>
          <td>
           Unix and Unix-like systems
          </td>
         </tr>
         <tr>
          <th scope="row">
           <code class="literal">
            PIPE
           </code>
          </th>
          <td>
           Named-pipe transport to local server
          </td>
          <td>
           Windows
          </td>
         </tr>
         <tr>
          <th scope="row">
           <code class="literal">
            MEMORY
           </code>
          </th>
          <td>
           Shared-memory transport to local server
          </td>
          <td>
           Windows
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <p>
       See also
       <a class="xref" href="transport-protocols.html" title="6.2.7 Connection Transport Protocols">
        Section 6.2.7, “Connection Transport Protocols”
       </a>
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_shared-memory-base-name">
       </a>
       <a class="link" href="connection-options.html#option_general_shared-memory-base-name">
        <code class="option">
         --shared-memory-base-name=
         <em class="replaceable">
          <code>
           name
          </code>
         </em>
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for shared-memory-base-name">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --shared-memory-base-name=name
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Platform Specific
          </th>
          <td>
           Windows
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323318592">
      </a>
      <p>
       On Windows, the shared-memory name to use for connections
            made using shared memory to a local server. The default
            value is
       <code class="literal">
        MYSQL
       </code>
       . The shared-memory name is
            case-sensitive.
      </p>
      <p>
       This option applies only if the server was started with the
       <a class="link" href="server-system-variables.html#sysvar_shared_memory">
        <code class="literal">
         shared_memory
        </code>
       </a>
       system
            variable enabled to support shared-memory connections.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_socket">
       </a>
       <a class="link" href="connection-options.html#option_general_socket">
        <code class="option">
         --socket=
         <em class="replaceable">
          <code>
           path
          </code>
         </em>
        </code>
       </a>
       ,
       <code class="option">
        -S
        <em class="replaceable">
         <code>
          path
         </code>
        </em>
       </code>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for socket">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --socket={file_name|pipe_name}
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           String
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323303712">
      </a>
      <p>
       On Unix, the name of the Unix socket file to use for
            connections made using a named pipe to a local server. The
            default Unix socket file name is
       <code class="filename">
        /tmp/mysql.sock
       </code>
       .
      </p>
      <p>
       On Windows, the name of the named pipe to use for
            connections to a local server. The default Windows pipe name
            is
       <code class="literal">
        MySQL
       </code>
       . The pipe name is not
            case-sensitive.
      </p>
      <p>
       On Windows, this option applies only if the server was
            started with the
       <a class="link" href="server-system-variables.html#sysvar_named_pipe">
        <code class="literal">
         named_pipe
        </code>
       </a>
       system variable enabled to support named-pipe connections.
            In addition, the user making the connection must be a member
            of the Windows group specified by the
       <a class="link" href="server-system-variables.html#sysvar_named_pipe_full_access_group">
        <code class="literal">
         named_pipe_full_access_group
        </code>
       </a>
       system variable.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_user">
       </a>
       <a class="link" href="connection-options.html#option_general_user">
        <code class="option">
         --user=
         <em class="replaceable">
          <code>
           user_name
          </code>
         </em>
        </code>
       </a>
       ,
       <code class="option">
        -u
        <em class="replaceable">
         <code>
          user_name
         </code>
        </em>
       </code>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for user">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --user=user_name
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           String
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323286112">
      </a>
      <p>
       The user name of the MySQL account to use for connecting to
            the server. The default user name is
       <code class="literal">
        ODBC
       </code>
       on Windows or your Unix login name on Unix.
      </p>
     </li>
    </ul>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h4 class="title">
       <a name="encrypted-connection-options">
       </a>
       Command Options for Encrypted Connections
      </h4>
     </div>
    </div>
   </div>
   <a class="indexterm" name="idm46045323282144">
   </a>
   <a class="indexterm" name="idm46045323280656">
   </a>
   <a class="indexterm" name="idm46045323279168">
   </a>
   <a class="indexterm" name="idm46045323277712">
   </a>
   <p>
    This section describes options for client programs that specify
        whether to use encrypted connections to the server, the names of
        certificate and key files, and other parameters related to
        encrypted-connection support. For examples of suggested use and
        how to check whether a connection is encrypted, see
    <a class="xref" href="using-encrypted-connections.html" title="8.3.1 Configuring MySQL to Use Encrypted Connections">
     Section 8.3.1, “Configuring MySQL to Use Encrypted Connections”
    </a>
    .
   </p>
   <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
    <div class="admon-title">
     Note
    </div>
    <p>
     These options have an effect only for connections that use a
          transport protocol subject to encryption; that is, TCP/IP and
          Unix socket-file connections. See
     <a class="xref" href="transport-protocols.html" title="6.2.7 Connection Transport Protocols">
      Section 6.2.7, “Connection Transport Protocols”
     </a>
    </p>
   </div>
   <p>
    For information about using encrypted connections from the MySQL
        C API, see
    <a class="ulink" href="/doc/c-api/8.4/en/c-api-encrypted-connections.html" target="_top">
     Support for Encrypted Connections
    </a>
    .
   </p>
   <div class="table">
    <a name="idm46045323271856">
    </a>
    <p class="title">
     <b>
      Table 6.5 Connection-Encryption Option Summary
     </b>
    </p>
    <div class="table-contents">
     <table frame="box" rules="all" summary="Command-line options available for establishing encrypted connections.">
      <colgroup>
       <col style="width: 35%"/>
       <col style="width: 64%"/>
      </colgroup>
      <thead>
       <tr>
        <th>
         Option Name
        </th>
        <th>
         Description
        </th>
       </tr>
      </thead>
      <tbody>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_get-server-public-key">
          --get-server-public-key
         </a>
        </td>
        <td>
         Request RSA public key from server
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_server-public-key-path">
          --server-public-key-path
         </a>
        </td>
        <td>
         Path name to file containing RSA public key
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_ssl-ca">
          --ssl-ca
         </a>
        </td>
        <td>
         File that contains list of trusted SSL Certificate Authorities
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_ssl-capath">
          --ssl-capath
         </a>
        </td>
        <td>
         Directory that contains trusted SSL Certificate Authority certificate files
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_ssl-cert">
          --ssl-cert
         </a>
        </td>
        <td>
         File that contains X.509 certificate
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_ssl-cipher">
          --ssl-cipher
         </a>
        </td>
        <td>
         Permissible ciphers for connection encryption
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_ssl-crl">
          --ssl-crl
         </a>
        </td>
        <td>
         File that contains certificate revocation lists
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_ssl-crlpath">
          --ssl-crlpath
         </a>
        </td>
        <td>
         Directory that contains certificate revocation-list files
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_ssl-fips-mode">
          --ssl-fips-mode
         </a>
        </td>
        <td>
         Whether to enable FIPS mode on client side
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_ssl-key">
          --ssl-key
         </a>
        </td>
        <td>
         File that contains X.509 key
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_ssl-mode">
          --ssl-mode
         </a>
        </td>
        <td>
         Desired security state of connection to server
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_ssl-session-data">
          --ssl-session-data
         </a>
        </td>
        <td>
         File that contains SSL session data
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_ssl-session-data-continue-on-failed-reuse">
          --ssl-session-data-continue-on-failed-reuse
         </a>
        </td>
        <td>
         Whether to establish connections if session reuse fails
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_tls-ciphersuites">
          --tls-ciphersuites
         </a>
        </td>
        <td>
         Permissible TLSv1.3 ciphersuites for encrypted connections
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_tls-version">
          --tls-version
         </a>
        </td>
        <td>
         Permissible TLS protocols for encrypted connections
        </td>
       </tr>
      </tbody>
     </table>
    </div>
    <div class="table-contents">
     <table cellpadding="0" cellspacing="0" style="position: fixed; top: 0px; display: none; left: 401px; width: 739px;">
      <thead>
       <tr>
        <th style="width: 260.906px;">
         Option Name
        </th>
        <th style="width: 477.094px;">
         Description
        </th>
       </tr>
      </thead>
     </table>
    </div>
   </div>
   <br class="table-break"/>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <a name="option_general_get-server-public-key">
       </a>
       <a class="link" href="connection-options.html#option_general_get-server-public-key">
        <code class="option">
         --get-server-public-key
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for get-server-public-key">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --get-server-public-key
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Boolean
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323213904">
      </a>
      <p>
       Request from the server the public key required for RSA key
            pair-based password exchange. This option applies to clients
            that authenticate with the
       <code class="literal">
        caching_sha2_password
       </code>
       authentication
            plugin. For that plugin, the server does not send the public
            key unless requested. This option is ignored for accounts
            that do not authenticate with that plugin. It is also
            ignored if RSA-based password exchange is not used, as is
            the case when the client connects to the server using a
            secure connection.
      </p>
      <p>
       If
       <a class="link" href="connection-options.html#option_general_server-public-key-path">
        <code class="option">
         --server-public-key-path=
         <em class="replaceable">
          <code>
           file_name
          </code>
         </em>
        </code>
       </a>
       is given and specifies a valid public key file, it takes
            precedence over
       <a class="link" href="connection-options.html#option_general_get-server-public-key">
        <code class="option">
         --get-server-public-key
        </code>
       </a>
       .
      </p>
      <p>
       For information about the
       <code class="literal">
        caching_sha2_password
       </code>
       plugin, see
       <a class="xref" href="caching-sha2-pluggable-authentication.html" title="8.4.1.2 Caching SHA-2 Pluggable Authentication">
        Section 8.4.1.2, “Caching SHA-2 Pluggable Authentication”
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_server-public-key-path">
       </a>
       <a class="link" href="connection-options.html#option_general_server-public-key-path">
        <code class="option">
         --server-public-key-path=
         <em class="replaceable">
          <code>
           file_name
          </code>
         </em>
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for server-public-key-path">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --server-public-key-path=file_name
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           File name
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323196160">
      </a>
      <p>
       The path name to a file in PEM format containing a
            client-side copy of the public key required by the server
            for RSA key pair-based password exchange. This option
            applies to clients that authenticate with the
       <code class="literal">
        sha256_password
       </code>
       (deprecated) or
       <code class="literal">
        caching_sha2_password
       </code>
       authentication
            plugin. This option is ignored for accounts that do not
            authenticate with one of those plugins. It is also ignored
            if RSA-based password exchange is not used, as is the case
            when the client connects to the server using a secure
            connection.
      </p>
      <p>
       If
       <a class="link" href="connection-options.html#option_general_server-public-key-path">
        <code class="option">
         --server-public-key-path=
         <em class="replaceable">
          <code>
           file_name
          </code>
         </em>
        </code>
       </a>
       is given and specifies a valid public key file, it takes
            precedence over
       <a class="link" href="connection-options.html#option_general_get-server-public-key">
        <code class="option">
         --get-server-public-key
        </code>
       </a>
       .
      </p>
      <p>
       This option is available only if MySQL was built using
            OpenSSL.
      </p>
      <p>
       For information about the
       <code class="literal">
        sha256_password
       </code>
       (deprecated) and
       <code class="literal">
        caching_sha2_password
       </code>
       plugins, see
       <a class="xref" href="sha256-pluggable-authentication.html" title="8.4.1.3 SHA-256 Pluggable Authentication">
        Section 8.4.1.3, “SHA-256 Pluggable Authentication”
       </a>
       , and
       <a class="xref" href="caching-sha2-pluggable-authentication.html" title="8.4.1.2 Caching SHA-2 Pluggable Authentication">
        Section 8.4.1.2, “Caching SHA-2 Pluggable Authentication”
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_ssl-ca">
       </a>
       <a class="link" href="connection-options.html#option_general_ssl-ca">
        <code class="option">
         --ssl-ca=
         <em class="replaceable">
          <code>
           file_name
          </code>
         </em>
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for ssl-ca">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --ssl-ca=file_name
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           File name
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323175872">
      </a>
      <p>
       The path name of the Certificate Authority (CA) certificate
            file in PEM format. The file contains a list of trusted SSL
            Certificate Authorities.
      </p>
      <p>
       To tell the client not to authenticate the server
            certificate when establishing an encrypted connection to the
            server, specify neither
       <a class="link" href="connection-options.html#option_general_ssl-ca">
        <code class="option">
         --ssl-ca
        </code>
       </a>
       nor
       <a class="link" href="connection-options.html#option_general_ssl-capath">
        <code class="option">
         --ssl-capath
        </code>
       </a>
       . The server
            still verifies the client according to any applicable
            requirements established for the client account, and it
            still uses any
       <a class="link" href="server-system-variables.html#sysvar_ssl_ca">
        <code class="literal">
         ssl_ca
        </code>
       </a>
       or
       <a class="link" href="server-system-variables.html#sysvar_ssl_capath">
        <code class="literal">
         ssl_capath
        </code>
       </a>
       system variable
            values specified on the server side.
      </p>
      <p>
       To specify the CA file for the server, set the
       <a class="link" href="server-system-variables.html#sysvar_ssl_ca">
        <code class="literal">
         ssl_ca
        </code>
       </a>
       system variable.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_ssl-capath">
       </a>
       <a class="link" href="connection-options.html#option_general_ssl-capath">
        <code class="option">
         --ssl-capath=
         <em class="replaceable">
          <code>
           dir_name
          </code>
         </em>
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for ssl-capath">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --ssl-capath=dir_name
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Directory name
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323157200">
      </a>
      <p>
       The path name of the directory that contains trusted SSL
            certificate authority (CA) certificate files in PEM format.
      </p>
      <p>
       To tell the client not to authenticate the server
            certificate when establishing an encrypted connection to the
            server, specify neither
       <a class="link" href="connection-options.html#option_general_ssl-ca">
        <code class="option">
         --ssl-ca
        </code>
       </a>
       nor
       <a class="link" href="connection-options.html#option_general_ssl-capath">
        <code class="option">
         --ssl-capath
        </code>
       </a>
       . The server
            still verifies the client according to any applicable
            requirements established for the client account, and it
            still uses any
       <a class="link" href="server-system-variables.html#sysvar_ssl_ca">
        <code class="literal">
         ssl_ca
        </code>
       </a>
       or
       <a class="link" href="server-system-variables.html#sysvar_ssl_capath">
        <code class="literal">
         ssl_capath
        </code>
       </a>
       system variable
            values specified on the server side.
      </p>
      <p>
       To specify the CA directory for the server, set the
       <a class="link" href="server-system-variables.html#sysvar_ssl_capath">
        <code class="literal">
         ssl_capath
        </code>
       </a>
       system variable.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_ssl-cert">
       </a>
       <a class="link" href="connection-options.html#option_general_ssl-cert">
        <code class="option">
         --ssl-cert=
         <em class="replaceable">
          <code>
           file_name
          </code>
         </em>
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for ssl-cert">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --ssl-cert=file_name
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           File name
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323138640">
      </a>
      <p>
       The path name of the client SSL public key certificate file
            in PEM format. Chained SSL certificates are supported.
      </p>
      <p>
       To specify the server SSL public key certificate file, set
            the
       <a class="link" href="server-system-variables.html#sysvar_ssl_cert">
        <code class="literal">
         ssl_cert
        </code>
       </a>
       system
            variable.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_ssl-cipher">
       </a>
       <a class="link" href="connection-options.html#option_general_ssl-cipher">
        <code class="option">
         --ssl-cipher=
         <em class="replaceable">
          <code>
           cipher_list
          </code>
         </em>
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for ssl-cipher">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --ssl-cipher=name
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           String
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323125216">
      </a>
      <p>
       The list of permissible encryption ciphers for connections
            that use TLSv1.2. If no cipher in the list is supported,
            encrypted connections that use these TLS protocols do not
            work.
      </p>
      <p>
       For greatest portability,
       <em class="replaceable">
        <code>
         cipher_list
        </code>
       </em>
       should be a list of
            one or more cipher names, separated by colons. Examples:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa38345685"><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 constant">--ssl-cipher</span><span class="token attr-value"><span class="token punctuation">=</span>AES128-SHA</span>
<span class="token constant">--ssl-cipher</span><span class="token attr-value"><span class="token punctuation">=</span>DHE-RSA-AES128-GCM-SHA256:AES128-SHA</span></code></pre>
      </div>
      <p>
       OpenSSL supports the syntax for specifying ciphers described
            in the OpenSSL documentation at
       <a class="ulink" href="https://www.openssl.org/docs/manmaster/man1/ciphers.html" target="_blank">
        https://www.openssl.org/docs/manmaster/man1/ciphers.html
       </a>
       .
      </p>
      <p>
       For information about which encryption ciphers MySQL
            supports, see
       <a class="xref" href="encrypted-connection-protocols-ciphers.html" title="8.3.2 Encrypted Connection TLS Protocols and Ciphers">
        Section 8.3.2, “Encrypted Connection TLS Protocols and Ciphers”
       </a>
       .
      </p>
      <p>
       To specify the encryption ciphers for the server, set the
       <a class="link" href="server-system-variables.html#sysvar_ssl_cipher">
        <code class="literal">
         ssl_cipher
        </code>
       </a>
       system variable.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_ssl-crl">
       </a>
       <a class="link" href="connection-options.html#option_general_ssl-crl">
        <code class="option">
         --ssl-crl=
         <em class="replaceable">
          <code>
           file_name
          </code>
         </em>
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for ssl-crl">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --ssl-crl=file_name
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           File name
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323107392">
      </a>
      <p>
       The path name of the file containing certificate revocation
            lists in PEM format.
      </p>
      <p>
       If neither
       <a class="link" href="connection-options.html#option_general_ssl-crl">
        <code class="option">
         --ssl-crl
        </code>
       </a>
       nor
       <a class="link" href="connection-options.html#option_general_ssl-crlpath">
        <code class="option">
         --ssl-crlpath
        </code>
       </a>
       is given, no
            CRL checks are performed, even if the CA path contains
            certificate revocation lists.
      </p>
      <p>
       To specify the revocation-list file for the server, set the
       <a class="link" href="server-system-variables.html#sysvar_ssl_crl">
        <code class="literal">
         ssl_crl
        </code>
       </a>
       system variable.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_ssl-crlpath">
       </a>
       <a class="link" href="connection-options.html#option_general_ssl-crlpath">
        <code class="option">
         --ssl-crlpath=
         <em class="replaceable">
          <code>
           dir_name
          </code>
         </em>
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for ssl-crlpath">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --ssl-crlpath=dir_name
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Directory name
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323091536">
      </a>
      <p>
       The path name of the directory that contains certificate
            revocation-list files in PEM format.
      </p>
      <p>
       If neither
       <a class="link" href="connection-options.html#option_general_ssl-crl">
        <code class="option">
         --ssl-crl
        </code>
       </a>
       nor
       <a class="link" href="connection-options.html#option_general_ssl-crlpath">
        <code class="option">
         --ssl-crlpath
        </code>
       </a>
       is given, no
            CRL checks are performed, even if the CA path contains
            certificate revocation lists.
      </p>
      <p>
       To specify the revocation-list directory for the server, set
            the
       <a class="link" href="server-system-variables.html#sysvar_ssl_crlpath">
        <code class="literal">
         ssl_crlpath
        </code>
       </a>
       system
            variable.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_ssl-fips-mode">
       </a>
       <a class="link" href="connection-options.html#option_general_ssl-fips-mode">
        <code class="option">
         --ssl-fips-mode={OFF|ON|STRICT}
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for ssl-fips-mode">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --ssl-fips-mode={OFF|ON|STRICT}
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Deprecated
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Enumeration
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            OFF
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Valid Values
          </th>
          <td>
           <p class="valid-value">
            <code class="literal">
             OFF
            </code>
           </p>
           <p class="valid-value">
            <code class="literal">
             ON
            </code>
           </p>
           <p class="valid-value">
            <code class="literal">
             STRICT
            </code>
           </p>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323066704">
      </a>
      <p>
       Controls whether to enable FIPS mode on the client side. The
       <a class="link" href="connection-options.html#option_general_ssl-fips-mode">
        <code class="option">
         --ssl-fips-mode
        </code>
       </a>
       option
            differs from other
       <code class="option">
        --ssl-
        <em class="replaceable">
         <code>
          xxx
         </code>
        </em>
       </code>
       options in that it is not used to establish encrypted
            connections, but rather to affect which cryptographic
            operations to permit. See
       <a class="xref" href="fips-mode.html" title="8.8 FIPS Support">
        Section 8.8, “FIPS Support”
       </a>
       .
      </p>
      <p>
       These
       <a class="link" href="connection-options.html#option_general_ssl-fips-mode">
        <code class="option">
         --ssl-fips-mode
        </code>
       </a>
       values
            are permissible:
      </p>
      <div class="itemizedlist">
       <ul class="itemizedlist" style="list-style-type: circle; ">
        <li class="listitem">
         <p>
          <code class="literal">
           OFF
          </code>
          : Disable FIPS mode.
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           ON
          </code>
          : Enable FIPS mode.
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           STRICT
          </code>
          : Enable
          <span class="quote">
           “
           <span class="quote">
            strict
           </span>
           ”
          </span>
          FIPS mode.
         </p>
        </li>
       </ul>
      </div>
      <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
       <div class="admon-title">
        Note
       </div>
       <p>
        If the OpenSSL FIPS Object Module is not available, the
              only permissible value for
        <a class="link" href="connection-options.html#option_general_ssl-fips-mode">
         <code class="option">
          --ssl-fips-mode
         </code>
        </a>
        is
        <code class="literal">
         OFF
        </code>
        . In this case, setting
        <a class="link" href="connection-options.html#option_general_ssl-fips-mode">
         <code class="option">
          --ssl-fips-mode
         </code>
        </a>
        to
        <code class="literal">
         ON
        </code>
        or
        <code class="literal">
         STRICT
        </code>
        causes
              the client to produce a warning at startup and to operate
              in non-FIPS mode.
       </p>
      </div>
      <p>
       To specify the FIPS mode for the server, set the
       <a class="link" href="server-system-variables.html#sysvar_ssl_fips_mode">
        <code class="literal">
         ssl_fips_mode
        </code>
       </a>
       system
            variable.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_ssl-key">
       </a>
       <a class="link" href="connection-options.html#option_general_ssl-key">
        <code class="option">
         --ssl-key=
         <em class="replaceable">
          <code>
           file_name
          </code>
         </em>
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for ssl-key">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --ssl-key=file_name
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           File name
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323038672">
      </a>
      <p>
       The path name of the client SSL private key file in PEM
            format. For better security, use a certificate with an RSA
            key size of at least 2048 bits.
      </p>
      <p>
       If the key file is protected by a passphrase, the client
            program prompts the user for the passphrase. The password
            must be given interactively; it cannot be stored in a file.
            If the passphrase is incorrect, the program continues as if
            it could not read the key.
      </p>
      <p>
       To specify the server SSL private key file, set the
       <a class="link" href="server-system-variables.html#sysvar_ssl_key">
        <code class="literal">
         ssl_key
        </code>
       </a>
       system variable.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_ssl-mode">
       </a>
       <a class="link" href="connection-options.html#option_general_ssl-mode">
        <code class="option">
         --ssl-mode=
         <em class="replaceable">
          <code>
           mode
          </code>
         </em>
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for ssl-mode">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --ssl-mode=mode
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Enumeration
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            PREFERRED
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Valid Values
          </th>
          <td>
           <p class="valid-value">
            <code class="literal">
             DISABLED
            </code>
           </p>
           <p class="valid-value">
            <code class="literal">
             PREFERRED
            </code>
           </p>
           <p class="valid-value">
            <code class="literal">
             REQUIRED
            </code>
           </p>
           <p class="valid-value">
            <code class="literal">
             VERIFY_CA
            </code>
           </p>
           <p class="valid-value">
            <code class="literal">
             VERIFY_IDENTITY
            </code>
           </p>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045323015440">
      </a>
      <p>
       This option specifies the desired security state of the
            connection to the server. These mode values are permissible,
            in order of increasing strictness:
      </p>
      <div class="itemizedlist">
       <ul class="itemizedlist" style="list-style-type: circle; ">
        <li class="listitem">
         <p>
          <code class="literal">
           DISABLED
          </code>
          : Establish an unencrypted
                connection.
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           PREFERRED
          </code>
          : Establish an encrypted
                connection if the server supports encrypted connections,
                falling back to an unencrypted connection if an
                encrypted connection cannot be established. This is the
                default if
          <a class="link" href="connection-options.html#option_general_ssl-mode">
           <code class="option">
            --ssl-mode
           </code>
          </a>
          is
                not specified.
         </p>
         <p>
          Connections over Unix socket files are not encrypted
                with a mode of
          <code class="literal">
           PREFERRED
          </code>
          . To enforce
                encryption for Unix socket-file connections, use a mode
                of
          <code class="literal">
           REQUIRED
          </code>
          or stricter. (However,
                socket-file transport is secure by default, so
                encrypting a socket-file connection makes it no more
                secure and increases CPU load.)
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           REQUIRED
          </code>
          : Establish an encrypted
                connection if the server supports encrypted connections.
                The connection attempt fails if an encrypted connection
                cannot be established.
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           VERIFY_CA
          </code>
          : Like
          <code class="literal">
           REQUIRED
          </code>
          , but additionally verify the
                server Certificate Authority (CA) certificate against
                the configured CA certificates. The connection attempt
                fails if no valid matching CA certificates are found.
         </p>
        </li>
        <li class="listitem">
         <p>
          <code class="literal">
           VERIFY_IDENTITY
          </code>
          : Like
          <code class="literal">
           VERIFY_CA
          </code>
          , but additionally perform
                host name identity verification by checking the host
                name the client uses for connecting to the server
                against the identity in the certificate that the server
                sends to the client:
         </p>
         <div class="itemizedlist">
          <ul class="itemizedlist" style="list-style-type: square; ">
           <li class="listitem">
            <p>
             If the client uses OpenSSL 1.0.2 or higher, the
                    client checks whether the host name that it uses for
                    connecting matches either the Subject Alternative
                    Name value or the Common Name value in the server
                    certificate. Host name identity verification also
                    works with certificates that specify the Common Name
                    using wildcards.
            </p>
           </li>
           <li class="listitem">
            <p>
             Otherwise, the client checks whether the host name
                    that it uses for connecting matches the Common Name
                    value in the server certificate.
            </p>
           </li>
          </ul>
         </div>
         <p>
          The connection fails if there is a mismatch. For
                encrypted connections, this option helps prevent
                man-in-the-middle attacks.
         </p>
         <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
          <div class="admon-title">
           Note
          </div>
          <p>
           Host name identity verification with
           <code class="literal">
            VERIFY_IDENTITY
           </code>
           does not work with
                  self-signed certificates that are created
                  automatically by the server (see
           <a class="xref" href="creating-ssl-rsa-files-using-mysql.html" title="8.3.3.1 Creating SSL and RSA Certificates and Keys using MySQL">
            Section 8.3.3.1, “Creating SSL and RSA Certificates and Keys using MySQL”
           </a>
           ).
                  Such self-signed certificates do not contain the
                  server name as the Common Name value.
          </p>
         </div>
        </li>
       </ul>
      </div>
      <div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
       <div class="admon-title">
        Important
       </div>
       <p>
        The default setting,
        <a class="link" href="connection-options.html#option_general_ssl-mode">
         <code class="option">
          --ssl-mode=PREFERRED
         </code>
        </a>
        ,
              produces an encrypted connection if the other default
              settings are unchanged. However, to help prevent
              sophisticated man-in-the-middle attacks, it is important
              for the client to verify the server’s identity. The
              settings
        <a class="link" href="connection-options.html#option_general_ssl-mode">
         <code class="option">
          --ssl-mode=VERIFY_CA
         </code>
        </a>
        and
        <a class="link" href="connection-options.html#option_general_ssl-mode">
         <code class="option">
          --ssl-mode=VERIFY_IDENTITY
         </code>
        </a>
        are a better choice than the default setting to help
              prevent this type of attack. To implement one of these
              settings, you must first ensure that the CA certificate
              for the server is reliably available to all the clients
              that use it in your environment, otherwise availability
              issues will result. For this reason, they are not the
              default setting.
       </p>
      </div>
      <p>
       The
       <a class="link" href="connection-options.html#option_general_ssl-mode">
        <code class="option">
         --ssl-mode
        </code>
       </a>
       option
            interacts with CA certificate options as follows:
      </p>
      <div class="itemizedlist">
       <ul class="itemizedlist" style="list-style-type: circle; ">
        <li class="listitem">
         <p>
          If
          <a class="link" href="connection-options.html#option_general_ssl-mode">
           <code class="option">
            --ssl-mode
           </code>
          </a>
          is not
                explicitly set otherwise, use of
          <a class="link" href="connection-options.html#option_general_ssl-ca">
           <code class="option">
            --ssl-ca
           </code>
          </a>
          or
          <a class="link" href="connection-options.html#option_general_ssl-capath">
           <code class="option">
            --ssl-capath
           </code>
          </a>
          implies
          <a class="link" href="connection-options.html#option_general_ssl-mode">
           <code class="option">
            --ssl-mode=VERIFY_CA
           </code>
          </a>
          .
         </p>
        </li>
        <li class="listitem">
         <p>
          For
          <a class="link" href="connection-options.html#option_general_ssl-mode">
           <code class="option">
            --ssl-mode
           </code>
          </a>
          values of
          <code class="literal">
           VERIFY_CA
          </code>
          or
          <code class="literal">
           VERIFY_IDENTITY
          </code>
          ,
          <a class="link" href="connection-options.html#option_general_ssl-ca">
           <code class="option">
            --ssl-ca
           </code>
          </a>
          or
          <a class="link" href="connection-options.html#option_general_ssl-capath">
           <code class="option">
            --ssl-capath
           </code>
          </a>
          is also
                required, to supply a CA certificate that matches the
                one used by the server.
         </p>
        </li>
        <li class="listitem">
         <p>
          An explicit
          <a class="link" href="connection-options.html#option_general_ssl-mode">
           <code class="option">
            --ssl-mode
           </code>
          </a>
          option with a value other than
          <code class="literal">
           VERIFY_CA
          </code>
          or
          <code class="literal">
           VERIFY_IDENTITY
          </code>
          , together with an
                explicit
          <a class="link" href="connection-options.html#option_general_ssl-ca">
           <code class="option">
            --ssl-ca
           </code>
          </a>
          or
          <a class="link" href="connection-options.html#option_general_ssl-capath">
           <code class="option">
            --ssl-capath
           </code>
          </a>
          option,
                produces a warning that no verification of the server
                certificate is performed, despite a CA certificate
                option being specified.
         </p>
        </li>
       </ul>
      </div>
      <p>
       To require use of encrypted connections by a MySQL account,
            use
       <a class="link" href="create-user.html" title="15.7.1.3 CREATE USER Statement">
        <code class="literal">
         CREATE USER
        </code>
       </a>
       to create the
            account with a
       <code class="literal">
        REQUIRE SSL
       </code>
       clause, or use
       <a class="link" href="alter-user.html" title="15.7.1.1 ALTER USER Statement">
        <code class="literal">
         ALTER USER
        </code>
       </a>
       for an existing
            account to add a
       <code class="literal">
        REQUIRE SSL
       </code>
       clause. This
            causes connection attempts by clients that use the account
            to be rejected unless MySQL supports encrypted connections
            and an encrypted connection can be established.
      </p>
      <p>
       The
       <code class="literal">
        REQUIRE
       </code>
       clause permits other
            encryption-related options, which can be used to enforce
            security requirements stricter than
       <code class="literal">
        REQUIRE
            SSL
       </code>
       . For additional details about which command
            options may or must be specified by clients that connect
            using accounts configured using the various
       <code class="literal">
        REQUIRE
       </code>
       options, see
       <a class="xref" href="create-user.html#create-user-tls" title="CREATE USER SSL/TLS Options">
        CREATE USER SSL/TLS Options
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_ssl-session-data">
       </a>
       <a class="link" href="connection-options.html#option_general_ssl-session-data">
        <code class="option">
         --ssl-session-data=
         <em class="replaceable">
          <code>
           file_name
          </code>
         </em>
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for ssl-session-data">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --ssl-session-data=file_name
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           File name
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045322953488">
      </a>
      <p>
       The path name of the client SSL session data file in PEM
            format for session reuse.
      </p>
      <p>
       When you invoke a MySQL client program with the
       <a class="link" href="connection-options.html#option_general_ssl-session-data">
        <code class="option">
         --ssl-session-data
        </code>
       </a>
       option,
            the client attempts to deserialize session data from the
            file, if provided, and then use it to establish a new
            connection. If you supply a file, but the session is not
            reused, then the connection fails unless you also specified
            the
       <a class="link" href="connection-options.html#option_general_ssl-session-data-continue-on-failed-reuse">
        <code class="option">
         --ssl-session-data-continue-on-failed-reuse
        </code>
       </a>
       option on the command line when you invoked the client
            program.
      </p>
      <p>
       The
       <a class="link" href="mysql.html" title="6.5.1 mysql — The MySQL Command-Line Client">
        <span class="command">
         <strong>
          mysql
         </strong>
        </span>
       </a>
       command,
       <code class="literal">
        ssl_session_data_print
       </code>
       , generates the
            session data file (see
       <a class="xref" href="mysql-commands.html" title="6.5.1.2 mysql Client Commands">
        Section 6.5.1.2, “mysql Client Commands”
       </a>
       ).
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_ssl-session-data-continue-on-failed-reuse">
       </a>
       <a class="link" href="connection-options.html#option_general_ssl-session-data-continue-on-failed-reuse">
        <code class="option">
         ssl-session-data-continue-on-failed-reuse
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for ssl-session-data-continue-on-failed-reuse">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --ssl-session-data-continue-on-failed-reuse
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Boolean
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            OFF
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045322933360">
      </a>
      <p>
       Controls whether a new connection is started to replace an
            attempted connection that tried but failed to reuse session
            data specified with the
       <a class="link" href="connection-options.html#option_general_ssl-session-data">
        <code class="option">
         --ssl-session-data
        </code>
       </a>
       command-line option. By default, the
       <a class="link" href="connection-options.html#option_general_ssl-session-data-continue-on-failed-reuse">
        <code class="option">
         --ssl-session-data-continue-on-failed-reuse
        </code>
       </a>
       command-line option is off, which causes a client program to
            return a connect failure when session data are supplied and
            not reused.
      </p>
      <p>
       To ensure that a new, unrelated connection opens after
            session reuse fails silently, invoke MySQL client programs
            with both the
       <a class="link" href="connection-options.html#option_general_ssl-session-data">
        <code class="option">
         --ssl-session-data
        </code>
       </a>
       and
       <a class="link" href="connection-options.html#option_general_ssl-session-data-continue-on-failed-reuse">
        <code class="option">
         --ssl-session-data-continue-on-failed-reuse
        </code>
       </a>
       command-line options.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_tls-ciphersuites">
       </a>
       <a class="link" href="connection-options.html#option_general_tls-ciphersuites">
        <code class="option">
         --tls-ciphersuites=
         <em class="replaceable">
          <code>
           ciphersuite_list
          </code>
         </em>
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for tls-ciphersuites">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --tls-ciphersuites=ciphersuite_list
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           String
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            empty string
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045322914096">
      </a>
      <p>
       This option specifies which ciphersuites the client permits
            for encrypted connections that use TLSv1.3. The value is a
            list of zero or more colon-separated ciphersuite names. For
            example:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa31000598"><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">mysql <span class="token constant">--tls-ciphersuites</span>=<span class="token atrule">"<em class="replaceable">suite1</em>:<em class="replaceable">suite2</em>:<em class="replaceable">suite3</em>"</span></code></pre>
      </div>
      <p>
       The ciphersuites that can be named for this option depend on
            the SSL library used to compile MySQL. If this option is not
            set, the client permits the default set of ciphersuites. If
            the option is set to the empty string, no ciphersuites are
            enabled and encrypted connections cannot be established. For
            more information, see
       <a class="xref" href="encrypted-connection-protocols-ciphers.html" title="8.3.2 Encrypted Connection TLS Protocols and Ciphers">
        Section 8.3.2, “Encrypted Connection TLS Protocols and Ciphers”
       </a>
       .
      </p>
      <p>
       To specify which ciphersuites the server permits, set the
       <a class="link" href="server-system-variables.html#sysvar_tls_ciphersuites">
        <code class="literal">
         tls_ciphersuites
        </code>
       </a>
       system
            variable.
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_tls-version">
       </a>
       <a class="link" href="connection-options.html#option_general_tls-version">
        <code class="option">
         --tls-version=
         <em class="replaceable">
          <code>
           protocol_list
          </code>
         </em>
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for tls-version">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --tls-version=protocol_list
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           String
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <p class="valid-value">
            <code class="literal">
             TLSv1,TLSv1.1,TLSv1.2,TLSv1.3
            </code>
            (OpenSSL 1.1.1 or higher)
           </p>
           <p class="valid-value">
            <code class="literal">
             TLSv1,TLSv1.1,TLSv1.2
            </code>
            (otherwise)
           </p>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045322892736">
      </a>
      <p>
       This option specifies the TLS protocols the client permits
            for encrypted connections. The value is a list of one or
            more comma-separated protocol versions. For example:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting one-line language-terminal"><div class="docs-select-all right" id="sa37562064"><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">mysql <span class="token constant">--tls-version</span>=<span class="token atrule">"TLSv1.2,TLSv1.3"</span></code></pre>
      </div>
      <p>
       The protocols that can be named for this option depend on
            the SSL library used to compile MySQL, and on the MySQL
            Server release.
      </p>
      <div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">
       <div class="admon-title">
        Important
       </div>
       <div class="itemizedlist">
        <ul class="itemizedlist" style="list-style-type: circle; ">
         <li class="listitem">
          <p>
           Clients, including MySQL Shell, that support the
           <a class="link" href="connection-options.html#option_general_tls-version">
            <code class="option">
             --tls-version
            </code>
           </a>
           option
                  cannot make a TLS/SSL connection with the protocol set
                  to TLSv1 or TLSv1.1. If a client attempts to connect
                  using these protocols, for TCP connections, the
                  connection fails, and an error is returned to the
                  client. For socket connections, if
           <a class="link" href="connection-options.html#option_general_ssl-mode">
            <code class="option">
             --ssl-mode
            </code>
           </a>
           is set to
           <code class="literal">
            REQUIRED
           </code>
           , the connection fails,
                  otherwise the connection is made but with TLS/SSL
                  disabled. See
           <a class="xref" href="encrypted-connection-protocols-ciphers.html#encrypted-connection-deprecated-protocols" title="Removal of Support for the TLSv1 and TLSv1.1 Protocols">
            Removal of Support for the TLSv1 and TLSv1.1 Protocols
           </a>
           for more information.
          </p>
         </li>
         <li class="listitem">
          <p>
           Support for the TLSv1.3 protocol is available in MySQL
                  Server, provided that MySQL Server was compiled using
                  OpenSSL 1.1.1 or higher. The server checks the version
                  of OpenSSL at startup, and if it is lower than 1.1.1,
                  TLSv1.3 is removed from the default value for the
                  server system variables relating to the TLS version
                  (such as the
           <a class="link" href="server-system-variables.html#sysvar_tls_version">
            <code class="literal">
             tls_version
            </code>
           </a>
           system
                  variable).
          </p>
         </li>
        </ul>
       </div>
      </div>
      <p>
       Permitted protocols should be chosen such as not to leave
       <span class="quote">
        “
        <span class="quote">
         holes
        </span>
        ”
       </span>
       in the list. For example, these values
            do not have holes:
      </p>
      <div class="copytoclipboard-wrapper">
       <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa10893026"><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 constant">--tls-version</span>=<span class="token atrule">"TLSv1.2,TLSv1.3"</span>
<span class="token constant">--tls-version</span>=<span class="token atrule">"TLSv1.3"</span></code></pre>
      </div>
      <p>
       For details, see
       <a class="xref" href="encrypted-connection-protocols-ciphers.html" title="8.3.2 Encrypted Connection TLS Protocols and Ciphers">
        Section 8.3.2, “Encrypted Connection TLS Protocols and Ciphers”
       </a>
       .
      </p>
      <p>
       To specify which TLS protocols the server permits, set the
       <a class="link" href="server-system-variables.html#sysvar_tls_version">
        <code class="literal">
         tls_version
        </code>
       </a>
       system
            variable.
      </p>
     </li>
    </ul>
   </div>
  </div>
  <div class="simplesect">
   <div class="titlepage">
    <div>
     <div class="simple">
      <h4 class="title">
       <a name="connection-compression-options">
       </a>
       Command Options for Connection Compression
      </h4>
     </div>
    </div>
   </div>
   <p>
    This section describes options that enable client programs to
        control use of compression for connections to the server. For
        additional information and examples showing how to use them, see
    <a class="xref" href="connection-compression-control.html" title="6.2.8 Connection Compression Control">
     Section 6.2.8, “Connection Compression Control”
    </a>
    .
   </p>
   <div class="table">
    <a name="idm46045322873520">
    </a>
    <p class="title">
     <b>
      Table 6.6 Connection-Compression Option Summary
     </b>
    </p>
    <div class="table-contents">
     <table frame="box" rules="all" summary="Command-line options available for compression in connections to the server.">
      <colgroup>
       <col style="width: 35%"/>
       <col style="width: 64%"/>
      </colgroup>
      <thead>
       <tr>
        <th>
         Option Name
        </th>
        <th>
         Description
        </th>
       </tr>
      </thead>
      <tbody>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_compress">
          --compress
         </a>
        </td>
        <td>
         Compress all information sent between client and server
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_compression-algorithms">
          --compression-algorithms
         </a>
        </td>
        <td>
         Permitted compression algorithms for connections to server
        </td>
       </tr>
       <tr>
        <td>
         <a class="link" href="connection-options.html#option_general_zstd-compression-level">
          --zstd-compression-level
         </a>
        </td>
        <td>
         Compression level for connections to server that use zstd compression
        </td>
       </tr>
      </tbody>
     </table>
    </div>
   </div>
   <br class="table-break"/>
   <div class="itemizedlist">
    <ul class="itemizedlist" style="list-style-type: disc; ">
     <li class="listitem">
      <p>
       <a name="option_general_compress">
       </a>
       <a class="link" href="connection-options.html#option_general_compress">
        <code class="option">
         --compress
        </code>
       </a>
       ,
       <code class="option">
        -C
       </code>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for compress">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --compress[={OFF|ON}]
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Deprecated
          </th>
          <td>
           Yes
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Boolean
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            OFF
           </code>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045322844224">
      </a>
      <p>
       Compress all information sent between the client and the
            server if possible.
      </p>
      <p>
       This option is deprecated. Expect it to be removed in a
            future version of MySQL. See
       <a class="xref" href="connection-compression-control.html#connection-compression-legacy-configuration" title="Configuring Legacy Connection Compression">
        Configuring Legacy Connection Compression
       </a>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_compression-algorithms">
       </a>
       <a class="link" href="connection-options.html#option_general_compression-algorithms">
        <code class="option">
         --compression-algorithms=
         <em class="replaceable">
          <code>
           value
          </code>
         </em>
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for compression-algorithms">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --compression-algorithms=value
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Set
          </td>
         </tr>
         <tr>
          <th>
           Default Value
          </th>
          <td>
           <code class="literal">
            uncompressed
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Valid Values
          </th>
          <td>
           <p class="valid-value">
            <code class="literal">
             zlib
            </code>
           </p>
           <p class="valid-value">
            <code class="literal">
             zstd
            </code>
           </p>
           <p class="valid-value">
            <code class="literal">
             uncompressed
            </code>
           </p>
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045322823888">
      </a>
      <p>
       The permitted compression algorithms for connections to the
            server. The available algorithms are the same as for the
       <a class="link" href="server-system-variables.html#sysvar_protocol_compression_algorithms">
        <code class="literal">
         protocol_compression_algorithms
        </code>
       </a>
       system variable. The default value is
       <code class="literal">
        uncompressed
       </code>
       .
      </p>
     </li>
     <li class="listitem">
      <p>
       <a name="option_general_zstd-compression-level">
       </a>
       <a class="link" href="connection-options.html#option_general_zstd-compression-level">
        <code class="option">
         --zstd-compression-level=
         <em class="replaceable">
          <code>
           level
          </code>
         </em>
        </code>
       </a>
      </p>
      <div class="informaltable">
       <table frame="box" rules="all" summary="Properties for zstd-compression-level">
        <colgroup>
         <col style="width: 30%"/>
         <col style="width: 70%"/>
        </colgroup>
        <tbody>
         <tr>
          <th>
           Command-Line Format
          </th>
          <td>
           <code class="literal">
            --zstd-compression-level=#
           </code>
          </td>
         </tr>
         <tr>
          <th>
           Type
          </th>
          <td>
           Integer
          </td>
         </tr>
        </tbody>
       </table>
      </div>
      <a class="indexterm" name="idm46045322809936">
      </a>
      <p>
       The compression level to use for connections to the server
            that use the
       <code class="literal">
        zstd
       </code>
       compression algorithm.
            The permitted levels are from 1 to 22, with larger values
            indicating increasing levels of compression. The default
       <code class="literal">
        zstd
       </code>
       compression level is 3. The
            compression level setting has no effect on connections that
            do not use
       <code class="literal">
        zstd
       </code>
       compression.
      </p>
     </li>
    </ul>
   </div>
  </div>
 </div>
 <br/>
</div>
