Enabling SSL in MySQL
Posted
by
Bio.X2Y
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Bio.X2Y
Published on 2012-09-28T14:38:01Z
Indexed on
2012/09/28
15:50 UTC
Read the original article
Hit count: 434
I'm running Ubuntu Server 12.04, and I want to enable SSL connections to MySQL.
I've generated the following keys/certs files with OpenSSL:
- ca-cert.pem
- server-cert.pem
- server-key.pem
I stored these at /etc/mysql
, then added added the following lines to /etc/mysql/my.cnf
:
ssl-ca=/etc/mysql/ca-cert.pem
ssl-cert=/etc/mysql/server-cert.pem
ssl-key=/etc/mysql/server-key.pem
Next, I restarted the server with sudo service restart mysql
.
However, this doesn't seem to enable SSL. Within a mysql session:
mysql> show variables like '%ssl%';
+---------------+----------------------------+
| Variable_name | Value |
+---------------+----------------------------+
| have_openssl | DISABLED |
| have_ssl | DISABLED |
| ssl_ca | /etc/mysql/ca-cert.pem |
| ssl_capath | |
| ssl_cert | /etc/mysql/server-cert.pem |
| ssl_cipher | |
| ssl_key | /etc/mysql/server-key.pem |
+---------------+----------------------------+
Any ideas what I'm missing? Thanks
© Ask Ubuntu or respective owner