Close

August 19, 2016

Solving MySQL SSL Connection Issues

Self signing certificates and MySQL never seem to work the same way each time you set them up on dev servers (maybe we are just cursed). Nothing is more frustrating then trying to connect to an SSL server and getting the dreaded “ERROR [HY000] Unknown Error”. Its like an error message that just states an error has occurred. We did just stumble on a solution that has worked very well for a huge gamut of older MySQL servers.

We were trying to get an SSL connection to work using a variety of SQL tools (ODBC Connection test/HeidiSQL) when we decided to give MySQL Workbench a try again. The tool set had always been bulky in our opinion, but there is a hidden surprise in the “Manage Server Connection”, which we hadn’t seen.

SSL_WIZARD_MySQL_WorkBench

SSL Wizard! SSL Wizard is an epic tool hidden in the software that lets you connect to a database and generate SELF-SIGNED certificates effortlessly, with a click of a button. It generates both the Server AND Client certs/key, as well as providing a “My.CNF” sample file to show how to set them up on the MySQL Server. Aside from placing our new files in some massively obscure folder (C:\Users\myuser\AppData\Roaming\MySQL\Workbench\certificates\{5793789A-DEEA-4F5E-92CD-104F79155466}…Seriously?), we were able to upload the certs, configure the server and connect to it via SSL in under a minute.

So if you are facing the dreaded “HY000” error and cannot connect via SSL and a self-signed certificate, give the MySQL WorkBench a try. It has been a boon to our developement process in standing up encrypted connections for MySQL servers.

If you need any help don’t hesitate to Contact Us for a Consult.