首页 新闻 会员 周边

如何连接安装了ssl证书的mysql?

0
悬赏园豆:100 [已解决问题] 解决于 2018-06-28 10:17

Data Source=rm-wz9yj5x8e1***;

Initial Catalog=***;

user id=***;

password=***;

Convert Zero Datetime=True;

CertificateFile=E:\mysqlssl\ApsaraDB-CA-Chain\ApsaraDB-CA-Chain.pem;

CertificatePassword=***;

SslMode=Required;

报错  An error occurred accessing the database. This usually means that the connection to the database failed. Check that the connection string is correct and that the appropriate DbContext constructor is being used to specify it or find it in the application's config file. See http://go.microsoft.com/fwlink/?LinkId=386386 for information on DbContext and connections. See the inner exception for details of the failure.

数据库用的是阿里云的ssl证书 RDS mysql数据库,阿里云下载证书包含pem、p7b、jks三种格式,只读账号不需要ssl证书,测试可以连接,读写账号需要ssl证书以上是证书连接方式。请较各位大神,求解

Trr,song的主页 Trr,song | 初学一级 | 园豆:16
提问于:2018-06-08 13:57
< >
分享
最佳答案
0

Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;
SSL Mode=Required;CertificateFile=C:\folder\client.pfx;CertificatePassword=pass;

推荐网站:https://www.connectionstrings.com

收获园豆:100
吴瑞祥 | 高人七级 |园豆:29449 | 2018-06-08 14:42

虽然还是连接失败,但还是非常感谢你的支持,通过你的提示感觉不是连接字符串的问题,我去提交工单问问阿里云

Trr,song | 园豆:16 (初学一级) | 2018-06-08 15:52
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册