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?
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!
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.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.