I have several Lightsail instances (mostly LAMP stacks) and a Lightsail dedicated database (mysql). Two of my lightsail instances use SSL as they are hosts for web applications and are attached to domains. I was trying to migrate data from the local database on one of these instances to my dedicated database using the mysql command line.
When I try to connect with the command line from one of the servers that uses SSL, it fails with "ERROR 2026 (HY000): SSL connection error: unknown error number".
If I try the same exact command from a cloned server that does not use SSL, it works fine. Same MySQL version, same OS version, only difference is one is a dev server that I don't have any certificates installed on.
To make this more confusing, if I connect to this database in a PHP script executed from the command line of the server with the SSL cert installed, it works fine. And I can create a PHP script that can run through Apache that also connects just fine. It's only the command line that is failing to connect and giving this error.
Any idea why I would only have issues connecting with mysql command lines? I've tried google and all the responses I have found have specific error messages and the suggested fixes, which are just to include a .pem file for the dedicated datbase in the command line, don't work.