How do I fix the SSL "unknown error number" error when connecting to MySQL?

You may get a ERROR 2026 (HY000): SSL connection error: unknown error number error when you try to connect to MySQL or MariaDB with an outdated client that does not support TLSv1.2 or TLSv1.3.

To fix this error, upgrade your client to a version that supports TLSv1.2 or TLSv1.3. MySQL also supports many options for customizing connections.

For more details on MySQL versions and their supported TLS versions, see the MySQL Encrypted Connection TLS Protocols and Ciphers docs.

Update backup user permissions, remove the –single-transaction flag, or downgrade mysqldump.
Use MySQL’s import command instead of source for handling large data imports.
Remove or replace the DEFINER in the dump file.