dsk95913 2015-06-16 16:33
浏览 74

PHP PDO_MYSQL + mysqlnd_ms没有连接SSL

I've setup mysqlnd_ms to use read/write splitting but when I require SSL (using REQUIRE ISSUER to check signer of client cert) the connection is rejected. It seems that the driver options array that contains the PDO::MYSQL_ATTR_SSL_* paths to the certificate and key files is being ignored with the host matches a mysqlnd_ms config. If I connect with a direct address:port instead of matching with the mysqlnd_ms config it works fine.

The error message does include the right username which is not in the mysqlnd_ms config so at least that is working when making a new PDO object.

I'm using PHP 5.5.25, mysqlnd 5.0.11, mysqlnd_ms 1.5.2, Percona XtraDB Cluster 5.6.21.

My config file:

{
    "10.2.90.27": {
        "master": {
            "master_0": {
                "host": "10.2.90.27",
                "port": "33455"
            }
        },
        "slave": {
            "slave_0": {
                "host": "10.2.90.27",
                "port": "33406"
            }
        }
    }
}

Yes, the IP is the same for master and slave. It's a VIP shared by two load balancers (HAProxy) and the port number determines which nodes the connection goes to. HAProxy is providing failover because it has the capability to do health checks.

How can I get mysqlnd_ms and PDO_MYSQL using client SSL certificates to work with each other?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 多电路系统共用电源的串扰问题
    • ¥15 slam rangenet++配置
    • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
    • ¥15 对于相关问题的求解与代码
    • ¥15 ubuntu子系统密码忘记
    • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
    • ¥15 保护模式-系统加载-段寄存器
    • ¥15 电脑桌面设定一个区域禁止鼠标操作
    • ¥15 求NPF226060磁芯的详细资料
    • ¥15 使用R语言marginaleffects包进行边际效应图绘制