MYSQL_ATTR_SSL_VERIFY_SERVER_CERT=true --> always error SQLSTATE[HY000].
The PDO option MYSQL_ATTR_SSL_VERIFY_SERVER_CERT is supposed to enable or to disable checking of a server certificate.
But, If omitted or if set to 'true', you'll receive an error: SQLSTATE[HY000]. We wonder if this behavior is normal, or if there is still a bug in related with this option
People on the internet generally recommend setting the parameter to false... but that's not what we need :o(
Hello, Finally, the PDO option MYSQL_ATTR_SSL_VERIFY_SERVER_CERT works very well: there was simply a problem of rights on the file containing the certificates of the certification authorities : in other words, my app couldn't read my truststore file so it couldn't validate the certificate ... giving a handshake error and the SQLSTATE[HY000][2002 message. It is not obvious from the error message that this is a problem with the rights of the file. So, the problem is now solved ! Michel