Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 开启ssl连接tidb异常
I deployed a TiDB instance (version 5.4) using k8s, with the operator version being 1.4.0. I enabled secure communication for client connections to TiDB by setting the value of .spec.tidb.tlsClient.enabled to true. I generated a set of certificates myself, including the CA, public key, and private key. After enabling SSL, the secrets for both the client and server were automatically generated:
The content of the secret is the PEM certificate encoded in base64:
However, when connecting to the instance using the MySQL client, I encountered an error. The connection command is:
mysql -u root -p -P4000 -h127.0.0.1 --ssl-ca client-ca.pem
The error reported is:
ERROR 2026 (HY000): SSL connection error: unknown error number
The error description is indeed too brief, and I’m not sure where I went wrong. Has anyone configured certificates for secure connections before? I hope someone can help me troubleshoot this issue. Thank you.