ERROR 2026 (HY000): SSL connection error: unknown error number

  • Posted November 9, 2019
  • MySQL

Hi All,

The local MySQL database (v5.7) running on my Droplet (Ubuntu 18.04) got hacked yesterday, and I decided to go with a managed database instead.

Got everything setup and tried to connect from the command line in the droplet, using the flags provided during the managed database setup. At first it just hung there, and then I realized I needed to add the droplet’s IP to the allowed connections list.

Once I did, I got:

ERROR 2026 (HY000): SSL connection error: unknown error number

Now I was able to connect from my Windows PC using HeidiSQL and mySQL Workbench, but can’t connect from the droplet. I also was trying to get my PHP scripts to run using mysqli_connect, but they give me the error:

Connection failed: The server requested authentication method unknown to the client

I did some research online and found that I need to run the following mysql server command to allow the connection:

ALTER USER myuser IDENTIFIED WITH mysql_native_password BY ‘mypassword’;

I couldn’t find a way to run this command in Heidi or MySQL Workbench, and I cannot connect through the command line on the droplet due to the SSL error mentioned earlier.

I even tried upgrading to MySQL v8 on the droplet, but one of the tutorials I found didn’t work.

Any ideas how to get past these errors?

Thanks! -Ben


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Solution to this is to use mysql-client version 8. mysql8 can not be accessed by mysql clients lover then version 8

This comment has been deleted


obfuscating the secrets can you please post the full command that you’re running to connect to your managed db?