'MySQL doesn't seem to be enforcing use of SSL from ODBC connection

I thought I had set up my MySQL database to only accept SSL connections and I was expecting to have to configure the SSL Key, SSL Certificate and the SSL Certificate Authority in the ODBC setup. I also set 'SSL Mode' to REQUIRED.

This all seemed to work fine. I then set up a different PC and forgot to set up any SSL information, but the connection still worked.

I'm using MySQL 8.0.28 on Ubuntu 20.04.3. The MySQL SSL variables show up as I expected (ssl_ca, ssl_cert and ssl_key were all assigned by default) and I added the following to the mysqld.conf file:

[mysqld]
require_secure_transport = ON

I have also specifically set the user as REQUIRE SSL.

Am I misunderstanding how SSL needs to be configured at the client or am I missing something from the server?

Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source