Skip to content
Advertisement

MySQL SSL Remote Connection Error: Unable to get Private Key

I am attempting to write a PHP script (hosted on a VPS with GoDaddy) that connects to a remote MySQL database (hosted on an Amazon EC2 instance) using SSL.

I generated some certs (as per http://dev.mysql.com/doc/refman/5.0/en/creating-ssl-certs.html) and configured my.cnf on the remote/server database like so:

JavaScript

The configuration is working on the remote/server side (that is, a php script running locally to the remote database is able to establish a connection using the generated SSL certs).

However, while I can make an unsecured connection between the PHP script hosted on the VPS and the remote database, I get an error when I try to establish an SSL connection between the same two systems.

If I attempt to connect to the remote database via the command line using:

JavaScript

I get the error:

JavaScript

I get the same error when I attempt to connect to the server via the php script using:

JavaScript

results in the error:

JavaScript

I have already attempted a fix as per (forums.mysql.com/read.php?11,400856,401127), but making this change results in a “Segmentation fault”.

Is there a step that I’ve missed? What am I doing wrong?

Advertisement

Answer

RESOLVED:

removed the client-key.pem passphrase using

JavaScript

as per the instructions at this website.

I changed

JavaScript

and

JavaScript

but not

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement