3
2016-05-09T20:05:05.772747Z 0 [ERROR] SSL error: Unable to get private key from 'server-key.pem'
2016-05-09T20:05:05.772764Z 0 [Warning] Failed to set up SSL because of the following SSL library error: Unable to get private key

My installation correctly locates the certificate files however it does not start SSL as it is unable to get the pass phrase for the private key.

How can I configure a passphrase in the mysql configuration?

I have tried removing the passphrase from the key but openssl on ubuntu 16.04 requires a minimum passphrase length of 4 characters.

7
  • How are you attempting to remove the passphrase from the key in server-key.pem?
    – Castaglia
    May 17, 2016 at 16:41
  • openssl rsa -in infile -out outfile
    – sweetfa
    May 17, 2016 at 19:12
  • Interesting. On an Ubuntu 16.04 instance, I generated a key using openssl genrsa -des3 -out key.pem 2048, gave it a passphrase, then removed that passphrase using openssl rsa -in key.pem -out key.pem.new; I was prompted for the passphrase for reading key.pem, but after that, key.pem.new contained the passphrase-less key.
    – Castaglia
    May 17, 2016 at 19:36
  • Very, is there some way to turn off the checking that is set on your system?
    – sweetfa
    May 17, 2016 at 20:56
  • "Turn off the checking"? Once you have typed in the passphrase and have the key.pem.new, you should be able to use that key.pem.new in your MySQL configuration, and MySQL should then be able to read the private key without needing the passphrase.
    – Castaglia
    May 17, 2016 at 21:08

1 Answer 1

2

I had to make sure that mysql owned the .pem files by cd to directory that contains the .pem files and:

chown -R mysql .
chgrp -R mysql .

After doing that the problem was solved.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.