MySQL SSL Remote Connection Error: Unable to get Private Key

RESOLVED:

removed the client-key.pem passphrase using

openssl rsa -in client-key.pem -out client-key2.pem

as per the instructions at this website.

I changed

$key   = '/home/userName/etc/mysql/certs/client-key2.pem' ; 

and

mysql -h hostIP --ssl-ca=ca-cert.pem --ssl-cert=client-cert.pem --ssl-key=client-key2.pem –u ssluser –p

but not

[client]
ssl-key     =/etc/mysql/client-key.pem

For me the key needed to be converted to full rsa format, not just changing the headers:

openssl rsa -in client.key -out client.key.rsa

Thanks to Velkan over on dba exchange for that answer.


I my case, the owner of server-key.pem was root and not mysql.

Tags:

Mysql

Php

Ssl