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?
This textbox defaults to using Markdown to format your 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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!