title: How to connect to MySQL with X509 using JDBC?
body: <p>I've set up a MySQL (Community Server, 5.1) database server.</p>
  
  <p>I've set up SSL, created certificates, etc. </p>
  
  <p>I've created a user that has the REQUIRES X509 attribute.</p>
  
  <p>I can connect using this user using the command line client "mysql" and the "status" command shows that SSL is active, etc.</p>
  
  <p>I've followed exactly the instructions from the MySQL site about importing the certificates into Java truststore/keystore files.</p>
  
  <p>I just cannot connect to the database using these.</p>
  
  <p>If I use just the truststore file using a user with REQUIRES SSL then all is fine. Using the keystore file with a user with REQUIRES X509 just isn't having it.</p>
  
  <p>There seems to be lots of evidence on the web of people struggling with this and not many answers. Has ANYONE actually got this working?</p>