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
Lenniey
  • 5,220
  • 2
  • 18
  • 29
Silly Dude
  • 558
  • 3
  • 9
  • 22
  • 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. – Silly Dude Aug 03 '17 at 23:39

1 Answers1

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.

Silly Dude
  • 558
  • 3
  • 9
  • 22