PHP MySQL over SSL. Peer certificate did not match

前端 未结 5 1993
死守一世寂寞
死守一世寂寞 2020-12-25 13:56

I\'m trying to use Google Cloud SQL over SSL from GCE(Google Compute Engine) instance. My problem is that I cannot connect to Cloud SQL instance over SSL.

mysql comm

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-25 14:31

    For PDO connections that don't use Google cloud or cannot benefit from the proxy solution, they have fixed the bug and it is merged now. There is now a constant for this (starting April 2017):

    PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => false,
    

    http://git.php.net/?p=php-src.git;a=commit;h=247ce052cd0fc7d0d8ea1a0e7ea2075e9601766a

提交回复
热议问题