MySQL: SSL connection error: SSL is required but the server doesn't support it SSL / TLS Origin: Network Last updated 4 Nov 2026

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

The client demanded SSL/TLS (--ssl-mode=REQUIRED) but the MySQL server has TLS disabled or no certificates configured.

Exact message you may see SSL connection error: SSL is required but the server doesn't support itERROR 2026 (HY000): SSL connection errorSSL connection error: unknown error numberERROR 2026 (HY000): TLS/SSL error: SSL is required, but the server does not support itSSL is required but the server doesn't support it
Seen on: SSL MySQL Linux

Meaning

Enable TLS on the server (ssl_ca, ssl_cert, ssl_key, or auto-generated certs in MySQL 5.7+ / require_secure_transport), or connect with --ssl-mode=DISABLED on trusted local networks. Also appears with MySQL 8 clients vs MariaDB servers and with expired auto-generated certs.

Common causes

  • Server started without TLS files
  • MariaDB server with a MySQL 8 client default REQUIRED mode
  • Certificates missing or unreadable by mysqld
  • Expired auto-generated server certs
  • Wrong ssl-mode in connection string

⚡ Quick fix

  1. Check SHOW VARIABLES LIKE '%ssl%' on the server
  2. Configure ssl_ca/ssl_cert/ssl_key and restart
  3. Use --ssl-mode=PREFERRED or DISABLED for local development

Detailed fix by platform

MySQL

  1. SHOW VARIABLES LIKE 'have_ssl'; and \s in the client shows the cipher in use

How to diagnose

  1. Server — have_ssl YES?
  2. Client — ssl-mode setting?
  3. Cert files — Valid and readable?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

AH01909: server certificate does NOT include an ID which matches the server name — Apache: [ssl:warn] AH01909: example.com:443:0 server certificate does NOT include an ID which matches the server name (SSL / TLS)AH01909: server certi…CAA record forbids issuance — Let's Encrypt/CA: CAA record for example.com prevents issuance (SSL / TLS)CAA record forbids is…root certificate file "root.crt" does not exist — PostgreSQL: root certificate file "/home/user/.postgresql/root.crt" does not exist. Either provide the file or change sslmode (SSL / TLS)root certificate file…sql: database is closed / driver: bad connection — Go: sql: database is closed (Go)sql: database is clos…sql: no rows in result set — Go: sql: no rows in result set (Go)sql: no rows in resul…SSL routines: wrong version number — OpenSSL: error:1408F10B:SSL routines:ssl3_get_record:wrong version number (SSL / TLS)SSL routines: wrong v…SSL_CTX_use_PrivateKey_file failed (key values mismatch) — Nginx: [emerg] SSL_CTX_use_PrivateKey_file("/etc/ssl/server.key") failed (SSL: error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch) (SSL / TLS)SSL_CTX_use_PrivateKe…SSLCertificateFile: file does not exist — Apache: AH02240: Server should be SSL-aware but has no certificate configured / SSLCertificateFile: file '/etc/ssl/x.crt' does not exist or is empty (SSL / TLS)SSLCertificateFile: f…MySQL: SS…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.