Reputation: 884
I'm trying to enable SSL in MySQL. I ran the SSL Wizard on MySQL Workbench which generated these files:
ca-cert.pem
ca-key.pem
client-cert.pem
client-key.pem
server-cert.pem
server-key.pem
Then I changed my.cnf
file like this:
[client]
ssl-ca=<directory>/ca-cert.pem
ssl-cert=<directory>/client-cert.pem
ssl-key=<directory>/client-key.pem
[mysqld]
ssl-ca=<directory>/ca-cert.pem
ssl-cert=<directory>/server-cert.pem
ssl-key=<directory>/server-key.pem
where <directory>
is the directory where these files are located.
Then I set the configuration file path in MySQL Workbench and restarted mysql service but when I test the connection it gives me this error:
ERROR 2026 (HY000): SSL connection error: SSL is required but the server doesn't support it
How can I solve this?
Upvotes: 5
Views: 32982
Reputation: 762
I had a similar problem and it was solved by changing the certificate files permission.
sudo chmod 444 ca-cert.pem;
sudo chmod 444 client-cert.pem;
sudo chmod 400 client-key.pem;
sudo chmod 444 ca-cert.pem;
sudo chmod 444 server-cert.pem;
sudo chmod 400 server-key.pem;
sudo chown mysql:mysql ca-cert.pem;
sudo chown mysql:mysql client-cert.pem;
sudo chown mysql:mysql client-key.pem;
sudo chown mysql:mysql ca-cert.pem;
sudo chown mysql:mysql server-cert.pem;
sudo chown mysql:mysql server-key.pem;
Restart the server...
Upvotes: 7
Reputation: 1861
Change these 2 lines :
ssl-cert=<directory>//server-cert.pem
ssl-key=<directory>//server-key.pem
I had same problem,searched a lot and then I found, the thing is that MYSQL server interprets "/s" as "space".
So /server for server means /erver something.
Upvotes: 0