azure mysql ssl关闭,使用CA文件从Azure数据库for MySQL进行SSL连接

Following along with the Azure Documentation for their New MySQL service, it appears that you can setup SSL pretty simply with their Trusted CA Cert.

After following their steps and setting up my PHP connection string according to their docs, I get the following error:

Peer certificate CN=`AZUREREGION.control.database.windows.net' did not match expected CN=`MYDATABASE.mysql.database.azure.com' in testazure.php

I was able to "work around" the issue by changing my connection string's hostname from MYDATABASE.mysql.database.azure.com to AZUREREGION.control.database.windows.net but I feel like that's probably not what I should be doing. Any guidance from people more knowledgeable about either Azure Database for MySQL or PHP's SSL connections would be helpful!

----- UPDATE -----

I had previously accepted Jason's response below. His answer is NOT adequate. If you do as I mistakenly did above you WILL eventually experience an outage when MSFT decides to change the underlying DNS resolution for your database.

I ended up suffering an outage today because of this answer. I think

you may need to answer my question more thoroughly. As I mentioned in

my question, I felt like something was off by changing the "host" path

to the region. About 20 minutes ago, your internal DNS service changed

the underlying region record for "MYDATABASE.mysql.database.azure.com"

to "cr2.MYREGION.control.database.windows.net" instead of

"MYREGION.control.database.windows.net" without any warning. As such,

I'm removing the accepted answer.

解决方案

Your work-around is actually correct. As we were launching the service, we changed the DNS of the service to more accurately reflect your server, however we need to update the documentation as appropriate.

Thanks for reporting - we'll get the docs updated!

Jason

Azure DB for MySQL team

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值