HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

MySQL ssl setup failed

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
sslmysqlsetupfailed

Problem

I am following word by word of http://dev.mysql.com/doc/refman/5.0/en/creating-ssl-certs.html for creating SSL certificates to setup SSL enable replication but it is not working for me. Steps which I am following:

  • Using above reference I have created all required certificates in /var/opt/mysql_certs/



-
Changed the ownership of all the certificates chown -R mysql:mysql /var/opt/mysql_certs

-
Then I edited my /etc/my.conf and put these 3 lines in mysqld section:

ssl-ca=/var/opt/mysql_certs/ca-cert.pem
ssl-cert=/var/opt/mysql_certs/server-cert.pem
ssl-key=/var/opt/mysql_certs/server-key.pem


-
Lastly I am restarting mysqld with /etc/init.d/restart mysqld. But, I am getting following errors:

[Warning]: Failed to setup SSL`
[Warning] SSL error: SSL_CTX_set_default_verify_paths failed


FYI: OS is centOS 6.

Solution

I recently solved this issue on my own system and it turned out to be SELinux blocking the reads for the certificates. I fixed my problem by running a restorecon -v /path/to/certs/* but it could also be solved by disabling selinux by running setenforce 0 or by editing the /etc/selinux/config file and setting 'SELINUX=DISABLED'.

If you haven't disabled SELinux already that is.

Context

StackExchange Database Administrators Q#91514, answer score: 3

Revisions (0)

No revisions yet.