Getting an error while trying to enable encryption:
[ERROR] SSL error: Unable to get private key from '/etc/mysql/ssl/nginx.key' [Warning] Failed to set up SSL because of the following SSL library error: Unable to get private key
[mysqld] ssl-ca=/etc/mysql/ssl/nginx.ca ssl-cert=/etc/mysql/ssl/nginx.crt ssl-key=/etc/mysql/ssl/nginx.key
The key is generated like that:
openssl req -newkey rsa:4096 -nodes -keyout nginx.key -subj "/C=US/ST=California/L=Sacramento/O=MyOrg/OU=MyDev/CN=MyApp"
The openssl checks it fine.
I've tried to change permissions, owners, file names, moving to different directories, disabling SELinux (it's already disabled), looking at AppArmor logs (it doesn't block it), changing 'BEGIN/END PRIVATE KEY' to 'BEGIN/END RSA PRIVATE KEY'.
What's wrong with it?