MYSQL_ATTR_SSL_VERIFY_SERVER_CERT=true --> always error SQLSTATE[HY000][2002].

You are viewing an old version of this question. View the current version here.


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][2002]. 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(

Thanks Michel


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


Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.