title: What ciphers do I have available in MySQL Client?
body: <p>I am having the cryptic error when trying to connect to a remote MySQL 5.6 (Percona node) server with <code>mysql</code> and <strong>Workbench</strong> using SSL. I have made my own signed certificates and my own CA.</p>
  
  <p><code>mysql -h host -p -u user --ssl-ca=ca-cert.pem</code></p>
  
  <blockquote>
    <p>ERROR 2026 (HY000): SSL connection error: protocol version mismatch</p>
  </blockquote>
  
  <p>I have read around that I should include the cipher option. So I SSH into the server and rerun the same command (without the host) to pluck the cipher for the local connection.</p>
  
  <pre><code>mysql&gt;  show session status like '%cipher';
  +---------------+-----------------------------+
  | Variable_name | Value                       |
  +---------------+-----------------------------+
  | Ssl_cipher    | ECDHE-RSA-AES128-GCM-SHA256 |
  +---------------+-----------------------------+
  </code></pre>
  
  <p>When I retry including the cipher I get the next error message.</p>
  
  <p><code>mysql -h host -p -u user --ssl-ca=ca-cert.pem --ssl-cipher=ECDHE-RSA-AES128-GCM-SHA256</code></p>
  
  <blockquote>
    <p>ERROR 2026 (HY000): SSL connection error: Failed to set ciphers to use</p>
  </blockquote>
  
  <p>I understand from <a href="https://stackoverflow.com/q/43402892/2733184">Connect to MySQL using SHA2</a> that my client is most likely incapable of using SHA256 or higher to connect.</p>
  
  <p>I checked the available server ciphers that do not have high SHA:</p>
  
  <pre><code>ECDHE-RSA-AES128-SHA
  ECDHE-ECDSA-AES128-SHA
  ECDHE-RSA-AES256-SHA
  ECDHE-ECDSA-AES256-SHA
  DHE-DSS-AES128-SHA
  DHE-RSA-AES128-SHA
  DHE-RSA-AES256-SHA
  AES128-SHA
  DH-DSS-AES128-SHA
  ECDH-ECDSA-AES128-SHA
  AES256-SHA
  DH-DSS-AES256-SHA
  ECDH-ECDSA-AES256-SHA
  </code></pre>
  
  <p>I've tried these ciphers to no avail. Can anyone help me diagnose the issue? Could it be a problem with my certificates? or are the certificates determining the cipher?</p>
  
  <h2>Update: linked libraries</h2>
  
  <p>I have checked my server, <code>mysqld</code>'s SSL is linked against</p>
  
  <pre><code>libssl.so.1.0.0 =&gt; /lib/x86_64-linux-gnu/libssl.so.1.0.0
  </code></pre>
  
  <p>Nevertheless, I know for a fact that the Percona version is linked against OpenSSL.
  The client is compiled against </p>
  
  <pre><code>linux-vdso.so.1 =&gt; 
  libpthread.so.0 =&gt; /lib/x86_64-linux-gnu/libpthread.so.0
  libz.so.1       =&gt; /lib/x86_64-linux-gnu/libz.so.1
  libdl.so.2      =&gt; /lib/x86_64-linux-gnu/libdl.so.2
  libtinfo.so.5   =&gt; /lib/x86_64-linux-gnu/libtinfo.so.5
  libstdc++.so.6  =&gt; /usr/lib/x86_64-linux-gnu/libstdc++.so.6
  libm.so.6       =&gt; /lib/x86_64-linux-gnu/libm.so.6
  libgcc_s.so.1   =&gt; /lib/x86_64-linux-gnu/libgcc_s.so.1
  libc.so.6       =&gt; /lib/x86_64-linux-gnu/libc.so.6
  /lib64/ld-linux-x86-64.so.2```
  </code></pre>
  
  <p>I don't see anything SSL related there but <code>libdl</code> is present which means that there might be dynamic loading. However, I suspect that this client may well be compiled for YaSSL.</p>