Reputation: 184
When I try to connect to a MySQL server instance via command line, I get the following error:
computer:~ mysql -u user -h db.dbsite.com -p
Enter password:
ERROR 2026 (HY000): SSL connection error: error:00000005:lib(0):func(0):DH lib
Another user with access tried to reproduce it on their end, but connected successfully. Likewise, I can connect on my own home network. The issue has so far only appeared on a public coffee shop WiFi network. I don't have a strong background in networking some I'm not sure what attributes of the network would cause this issue.
I connect successfully elsewhere, so that rules out some of the other issues on StackOverflow (incorrect certificate for one, likewise many other issues are related to invalid server SSL config). Skipping ssl as mentioned here is not viable because of the security risk.
Other info:
OpenSSL 1.0.2p 14 Aug 2018
mysql Ver 8.0.12 for osx10.13 on x86_64 (Homebrew)
Upvotes: 0
Views: 3735
Reputation: 184
I found a fix in this case, it was as simple as adding --ssl-mode=required
. It's unclear to me why this argument is required in this case and not others.
Upvotes: 1