5

I followed the following process to create the CA, certificate and key PEF files:

https://dev.mysql.com/doc/refman/5.7/en/creating-ssl-files-using-openssl.html

I run "openssl verify" and verified that they are OK.

I then followed the following process to enable SSL on MySQL community:

https://dev.mysql.com/doc/refman/5.5/en/using-secure-connections.html

However, when I tried to connect to it:

mysql --user=root --password=mypassword
--ssl-ca="C:\ProgramData\MySQL\MySQL Server 5.7\SSL\ca.pem" --ssl-cert="C:\ProgramData\MySQL\MySQL Server 5.7\SSL\client-cert.pem" --ssl-key="C:\ProgramData\MySQL\MySQL Server 5.7\SSL\client-key.pem"

I got the following error:

ERROR 2026 (HY000): SSL connection error: SSL is required but the server doesn't support it
1
  • When I generated the CA using openssl, it didn't ask for a common name. The common name of the server and client certs are different.
    – AussieDude
    Aug 3, 2017 at 23:39

1 Answer 1

3

I worked out why. I had the following line in my.ini:

ssl-key="c:\ssl\server-key.pem"

MySQL interprets "\s" as a space. So it has been looking for

"c:\ssl erver-key.pem"

Obviously it can't find it.

Not the answer you're looking for? Browse other questions tagged .