title: MySQL ERROR 2026 - SSL connection error - Ubuntu 20.04
body: <p>I've recently upgraded my local machine OS from Ubuntu 18.04 to 20.04, I'm running my MySQL-server on CentOS (AWS). Post upgrade whenever I'm trying to connect to MySQL server it is throwing SSL connection error. </p>
  
  <pre class="lang-sh prettyprint-override"><code>$ mysql -u yamcha -h database.yourproject.com -p --port 3309
  
  ERROR 2026 (HY000): SSL connection error: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol
  </code></pre>
  
  <p>But if I pass <code>--ssl-mode=disabled</code> option along with it, I'm able to connect remotely.</p>
  
  <pre><code>$ mysql -u yamcha -h database.yourproject.com -p --port 3309 --ssl-mode=disabled
  
  Welcome to the MySQL monitor.  Commands end with ; or \g.
  Your MySQL connection id is 22158946
  Server version: 5.7.26 MySQL Community Server (GPL)
  
  Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
  
  Oracle is a registered trademark of Oracle Corporation and/or its
  affiliates. Other names may be trademarks of their respective
  owners.
  
  Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  
  mysql&gt; 
  
  </code></pre>
  
  <p><strong>Queries:</strong>  </p>
  
  <blockquote>
    <ol>
    <li>How to connect without passing <code>--ssl-mode=disabled</code>  </li>
    <li>How to pass this <code>--ssl-mode=disabled</code> option in my Django application, currently I've defined it as shown below, but I'm still getting the same error.</li>
    </ol>
  </blockquote>
  
  <pre class="lang-py prettyprint-override"><code>DATABASES = {
      'default': {
          'ENGINE': 'django.db.backends.mysql',
          'NAME': 'yamcha',
          'USER': 'yamcha',
          'PASSWORD': 'xxxxxxxxxxxxxxx',
          'HOST': 'database.yourproject.com',
          'PORT': '3309',
          'OPTIONS': {'ssl': False},
      }
  </code></pre>