-
Notifications
You must be signed in to change notification settings - Fork 805
Description
I have a mariadb server configured to accept TLS connections, but they are only mandatory for some specific users.
[mariadb]
ssl_cert = <file>.cer
ssl_key = <file>.key
ssl_ca = <ca>.cer
tls_version = TLSv1.2,TLSv1.3
require_secure_transport = yes
The protocol use is thus starttls, to connect in cleartext and upgrade later.
It can be succesfully tested using:
openssl s_client -starttls mysql -connect <host>:3306 -showcerts
Using this exporter, I can either connect in cleartext (mysql_global_status_ssl_verify_depth 0) but if I enable ssl-ca in .my.cnf or use --tls.insecure-skip-verify I get a Error opening connection to database" err="remote error: tls: handshake failure and on the server side I see a Oct 13 21:41:49 VT0CLDWTSDB01C mariadbd[1566]: 2025-10-13 21:41:49 2036401 [Warning] Aborted connection 2036401 to db: 'unconnected' user: 'unauthenticated' host: '<host>' (This connection closed normally without authentication).
How can I debug the connection furhter?