http://dev.mysql.com/doc/refman/5.6/en/using-ssl-connections.html
A client can determine whether the current connection with the server uses SSL by checking the value of the
Ssl_cipher
status variable. The value ofSsl_cipher
is nonempty if SSL is used, and empty otherwise. For example:
mysql> SHOW STATUS LIKE 'Ssl_cipher'; +---------------+--------------------+ | Variable_name | Value | +---------------+--------------------+ | Ssl_cipher | DHE-RSA-AES256-SHA | +---------------+--------------------+
Issue this command just like any regular query, and parse its result like a regular result set.