title: How to know if connection to Database is using SSL or not
body: <p>I'm using mysqli on PHP to connect to a mysql database. The database have open connection both with ssl and not.
  I have produced this code:</p>
  
  <pre><code>$db = mysqli_init();
  $db-&gt;ssl_set(NULL, NULL,'rds-combined-ca-bundle.pem',NULL,NULL);
  $db-&gt;real_connect($hostname,$username,$password,$database);
  $res = $db-&gt;query('SHOW TABLES;');
  print_r ($res);
  $db-&gt;close();
  </code></pre>
  
  <p>The output I get it's pretty fine, I get what I want, but I don't understand if my connection is goin out with SSL or not.
  If I change the cert name to xyzrds-combined-ca-bundle.pem, it keeps working with no errors... so I guess it just switch on no-ssl when the cert fail.</p>
  
  <p>Any clue on how I can know if I'm connected with SSL or not?</p>
  
  <p>Thanks a lot</p>