Hue SSL-enabled MySQL connection issues

Condition

When using Hue with SSL-enabled MySQL, connection issues may occur due to unsupported TLS protocols in newer MySQL client versions.

Example Error Message:
ERROR: django.db.utils.OperationalError: (2026, 'SSL connection error: error:14077102:SSL routines:SSL23_GET_SERVER_HELLO:unsupported protocol')

Cause

The error occurs because MySQL client version 8.0.28 and later has removed support for TLSv1 and TLSv1.1. As a result, SSL connections using these older protocols fail.

Solution

  1. Locate the my.cnf configuration file for your MySQL client.
  2. To ensure secure connections, configure your supported TLS versions similar to the example below:
    [mysqld]
    tls_version = TLSv1.2,TLSv1.3 \\ Example setting
    Replace the TLS versions configured in MySQL with the versions supported by your database system.
  3. Restart the MySQL service to apply the changes.