Description:
In trying to establish a secure connection using MySQL Shell generates the error: "MySQL Error (2026): SSL bad version".
Using certificates generated when installing MySQL.
How to repeat:
Using MySQL Shell 1.0.3 Development Preview
$ mysqlsh -u testsh -P 33065 --ssl-ca=/path/to/file/ca.pem --ssl-cert=/path/to/file/client-cert.pem --ssl-key=/path/to/file/client-key.pem
Creating an X Session to testsh@localhost:33065?ssl_ca=/path/to/file/ca.pem&ssl_cert=/path/to/file/client-cert.pem&ssl_key=/path/to/file/client-key.pem
Enter password:
MySQL Error (2026): SSL bad version
-------------------------------
Using MySQL monitor
$ mysql -u testsh -p --ssl-ca=/path/to/file/ca.pem --ssl-cert=/path/to/file/client-cert.pem --ssl-key=/path/to/file/client-key.pem
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.7.12 MySQL Community Server (GPL)
Copyright (c) 2000, 2016, 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 SESSION STATUS LIKE '%ssl_version%';
+--------------------+---------+
| Variable_name | Value |
+--------------------+---------+
| Mysqlx_ssl_version | |
| Ssl_version | TLSv1.1 |
+--------------------+---------+
2 rows in set (0.01 sec)
mysql> \s
--------------
mysql Ver 14.14 Distrib 5.7.12, for Linux (x86_64) using EditLine wrapper
Connection id: 1
Current database:
Current user: testsh@localhost
SSL: Cipher in use is DHE-RSA-AES256-SHA
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server version: 5.7.12 MySQL Community Server (GPL)
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /path/to/file/mysqld.sock
Uptime: 1 hour 4 min 33 sec
Threads: 1 Questions: 60 Slow queries: 0 Opens: 116 Flush tables: 1 Open tables: 35 Queries per second avg: 0.015
--------------
[15 Apr 2016 11:23]
William Chiquito
Change Category
[15 Apr 2016 12:04]
MySQL Verification Team
Hello William,
Thank you for the report.
Thanks,
Umesh
[11 May 2018 18:33]
Hema Sridharan
This has been fixed in versions of Shell released after 1.0.3 and the following was added to the internal changelog:
Using SSL to create a connection was failing with MySQL Error (2026): SSL bad
version.
Page generated in 0.055 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders. It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.