AWS MySQL ERROR 2026 (HY000): SSL connection error:

5,348

I had the same problem and figured it out-ish! brew most likely installed mysql 5.7 which, from what I can gather, requires ssl unless other wise specified by --skip-ssl. You can uninstall mysql by running brew uninstall mysql and then install 5.5 by running brew install https://raw.githubusercontent.com/Homebrew/homebrew-versions/master/mysql55.rb && brew link homebrew/versions/mysql55 --force.

Granted, this doesn't solve the problem of getting the initial error fixed, but I haven't found any documentation as to why 5.7 differs from 5.5 in such a way fresh out of the box. Best of luck to you!

Edit: Aha! Here's the documentation:

--ssl

For the MySQL server, this option specifies that the server permits but does not require SSL connections. The option is enabled on the server side by default as of MySQL 5.7.5, and disabled before 5.7.5. Also as of MySQL 5.7.5, MySQL servers compiled using OpenSSL can generate missing SSL files automatically at startup. See Section 6.3.13.1, “Creating SSL and RSA Certificates and Keys using MySQL”.

Edit 2:

Another option, instead of downgrading to 5.5, you can open up (or create) /etc/my.cnf or /etc/mysql/my.cnf and add the following with your existing mysql > 5.7.5:

[client]
ssl=0

This will disabled ssl on client connections and behave like mysql < 5.7.5.

Share:
5,348

Related videos on Youtube

leakybytes
Author by

leakybytes

Updated on September 18, 2022

Comments

  • leakybytes
    leakybytes over 1 year

    I' am trying to connect to my AWS RDS MySQL instance with terminal on OSX El Captain, but I keep getting this error:

    ERROR 2026 (HY000): SSL connection error: error:00000001:lib(0):func(0):reason(1)
    

    This is a fresh OSX install, and I used brew to install mysql along with openssl, I can connect to the local server. Also it seems MySQL workbench works perfectly fine.

    My Ubuntu machine connects to the RDS instance fine as well through terminal.

  • Derek Shockey
    Derek Shockey over 8 years
    In the spirit of homebrew, you can also put your my.cnf file in /usr/local/etc. (This didn't work for me as /usr/local/etc/mysql/my.cnf, however.)