Lightsail Dedicated DB SSL error 2026

0

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.

asked a year ago258 views
1 Answer
0
Accepted Answer

Looks like adding --ssl-mode=disabled to the mysql dump command fixed the issue. I guess it was assuming that since the server was using SSL for apache that mysql should use it too, but my dedicated database is not using ssl, so it was giving the error. By specifying not to use ssl, it was able to connect.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions