1
create procedure have_ssl()
2
select if(variable_value > '','yes','no') as 'have_ssl'
3
from information_schema.session_status
4
where variable_name='ssl_cipher';
5
mysql --ssl-ca=cacert.pem -e "call test.have_ssl()"
8
mysql --ssl -e "call test.have_ssl()"
11
mysql --ssl-ca=cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()"
12
ERROR 2026 (HY000): SSL connection error: SSL is required, but the server does not support it
13
mysql --ssl --ssl-verify-server-cert -e "call test.have_ssl()"
14
ERROR 2026 (HY000): SSL connection error: SSL is required, but the server does not support it
15
drop procedure have_ssl;