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.
Best Answer
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 runningbrew uninstall mysql
and then install 5.5 by runningbrew 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:
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:This will disabled ssl on client connections and behave like
mysql
< 5.7.5.