SSL is not being used to secure our connection to MySQL on Ubuntu 16.04

I have followed this tutorial here "How To Configure SSL/TLS for MySQL on Ubuntu 16.04 " and "How To Set Up a Remote Database to Optimize Site Performance with MySQL on Ubuntu 16.04 ".

In the log below, the have_openssl and have_ssl variables read “YES”. Furthermore, the ssl_ca, ssl_cert, and ssl_key variables have been populated with the names of the relevant certificates that we generated: mysql> SHOW VARIABLES LIKE ‘%ssl%’; ±--------------±----------------+ | Variable_name | Value | ±--------------±----------------+ | have_openssl | YES | | have_ssl | YES | | ssl_ca | ca.pem | | ssl_capath | | | ssl_cert | server-cert.pem | | ssl_cipher | | | ssl_crl | | | ssl_crlpath | | | ssl_key | server-key.pem | ±--------------±----------------+ 9 rows in set (0.01 sec)

However, when I check the connection details again, the specific SSL cipher is not displayed, indicating that SSL is not being used to secure our connection. See details below:

Current database:

SSL: Not in use Connection: Localhost via UNIX socket

What am I doing wrong?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You’re connecting via a unix socket (which is basically a magical file) - You don’t need SSL there, because the connection is local and doesn’t go via the network.

Try asking mysql to listen on localhost, and then connecting to that port instead of the unix sockets that mysql uses by default.