ERROR 2026 (HY000): SSL connection error: SSL is required but the server doesn't support it

Viewed 3617

When i am running mysql using key -:

sudo mysql -u user --ssl-ca=ca.pem --ssl-cert=client.pem --ssl-key=client.pem -p

I am running the above command in the directory where certs are located, so did not gave any addresses. I have concatenated client.crt and client.key to client.pem. They work fine in my local.

I am getting the error as -:

ERROR 2026 (HY000): SSL connection error: SSL is required but the server doesn't support it

Here is my Mysql SSL info -:

    ubuntu@ASI-POD8-VM-DS03:/etc/mysql$ mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.27-0ubuntu0.16.04.1-log (Ubuntu)

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> SHOW VARIABLES LIKE '%ssl%';
+---------------+-----------------------------------+
| Variable_name | Value                             |
+---------------+-----------------------------------+
| have_openssl  | DISABLED                          |
| have_ssl      | DISABLED                          |
| ssl_ca        | /home/ubuntu/ssl/rootCA.pem       |
| ssl_capath    |                                   |
| ssl_cert      | /home/ubuntu/ssl//server-cert.pem |
| ssl_cipher    | DHE-RSA-AES128-GCM-SHA256         |
| ssl_crl       |                                   |
| ssl_crlpath   |                                   |
| ssl_key       | /home/ubuntu/ssl//server-key.pem  |
+---------------+-----------------------------------+

If i will do -: less /home/ubuntu/ssl//server-key.pem or with server-cert.pem or with rootCA.pem, they open perfectly showing the keys or certs.

I have also altered the file file permissions -:

    -r--r--r-- 1 mysql mysql 1253 Oct 31 22:14 server-cert.pem
    -r--r--r-- 1 mysql mysql 1675 Oct 31 22:13 server-key.pem
    -rw-r--r-- 1 root  root   980 Oct 31 22:13 server-req.pem
    -r--r--r-- 1 mysql mysql 3016 Oct 31 22:21 client.pem
    -r--r--r-- 1 mysql mysql 1497 Oct 28 13:00 rootCA.pem

Have tried this all by decontcatenating client.pem into client.crt and client.key with same set of steps but nothing seems to work.

Have applied almost every patch available on internet i.e \s for space and changing permissions and doing process all over again. But still geting have_ssl = DISABLED and ERROR 2026.

Need Help.

0 Answers
Related