---
slug: "ubuntu-mysql-ssl-failed"
title: "Upgrading to Ubuntu 20 Results in ERROR 2026 (HY000): SSL connection error: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol"
description: "I upgraded Ubuntu to version 20.04, and when I tried to connect to MySQL, I encountered the following error: ERROR 2026 (HY000): SSL connection error: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol. As a result, I was unable to connect to MySQL."
url: "https://www.ytyng.com/en/blog/ubuntu-mysql-ssl-failed"
publish_date: "2020-06-01T01:18:08Z"
created: "2020-06-01T01:18:08Z"
updated: "2026-02-27T06:42:51.000Z"
categories: []
keywords: ""
featured_image_url: "https://media.ytyng.com/resize/20230812/180c263d31d340cbb8bbbf8265d7bc3d.png.webp?width=768"
has_video: false
has_music: false
video_urls: []
music_urls: []
lang: "en"
---

# Upgrading to Ubuntu 20 Results in ERROR 2026 (HY000): SSL connection error: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol

<p>After upgrading Ubuntu to 20.04 and attempting to connect to MySQL, I encountered the following error:</p>

<p></p>

<p>ERROR 2026 (HY000): SSL connection error: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol</p>

<p></p>

<p>I was unable to connect to MySQL.</p>

<p></p>

<p>This issue occurs whether I start a new EC2 instance from an Ubuntu 20.04 image or upgrade from Ubuntu 18 to 20 using do-release-upgrade. The same error appears whether I connect using the mysql command or from Django.</p>

<p></p>

<p>There is a solution on Stack Overflow:</p>

<p><a href="https://stackoverflow.com/questions/61649764/mysql-error-2026-ssl-connection-error-ubuntu-20-04">https://stackoverflow.com/questions/61649764/mysql-error-2026-ssl-connection-error-ubuntu-20-04</a></p>

<p></p>

<p>1. Open the file with sudo vim /usr/lib/ssl/openssl.cnf</p>

<p>2. Add the following line at the beginning of the file:</p>

<pre class="lang-sql prettyprint prettyprinted"><code><span class="pln">openssl_conf </span><span class="pun">=</span><span class="pln"> default_conf</span></code></pre>

<p></p>

<p>3. Add the following lines at the end of the file:</p>

<pre class="lang-sql prettyprint prettyprinted"><code><span class="pun">[</span><span class="pln"> default_conf </span><span class="pun">]</span><span class="pln">

ssl_conf </span><span class="pun">=</span><span class="pln"> ssl_sect

</span><span class="pun">[</span><span class="pln">ssl_sect</span><span class="pun">]</span><span class="pln">

system_default </span><span class="pun">=</span><span class="pln"> ssl_default_sect

</span><span class="pun">[</span><span class="pln">ssl_default_sect</span><span class="pun">]</span><span class="pln">
MinProtocol </span><span class="pun">=</span><span class="pln"> TLSv1
CipherString </span><span class="pun">=</span><span class="pln"> </span><span class="kwd">DEFAULT</span><span class="pun">:@</span><span class="pln">SECLEVEL</span><span class="pun">=</span><span class="lit">1</span></code></pre>

<p>This solution resolved the issue for me.</p>

<p></p>
