How to connect to an Amazon MySQL RDS instance via PHP over SSL

前端 未结 2 1221
野的像风
野的像风 2020-12-21 02:23

I have an EC2 instance running a WordPress site. The WordPress db is on a RDS instance. I want to connect to the db over SSL.

From what I\'ve read, the MySQL exten

2条回答
  •  遥遥无期
    2020-12-21 02:57

    Try this:

    $db = mysqli_init();
    $db->ssl_set(null, 'https://rds.amazonaws.com/doc/mysql-ssl-ca-cert.pem', null, null, null);
    

提交回复
热议问题