mysql ssl报错_MySQL主从ssl加密传输报错解决

案例:今天实施MySQL主从+SSL加密传输时候,master为slave签署证书有一个小小问题:

failedto update databaseTXT_DBerror number 2

ac9a14752abb4270adfe864c23b70f65.png

一开始没留意,最后导致在slave通过证书连接master时候报错证书错误。仔细检查才看到错误。

1、报错原因:

This thing happens when certificates share common data. You cannot have two

certificates that look otherwise the same.

意思当证书共享数据,不能两个相同。

2、解决方式:

2.1)修改index.txt.attr为no(采用)[[email protected] CA]# cat index.txt.attr

unique_subject = no

[[email protected] CA]#

2.2)将comonName设置为不同

在master和slave中,因为我用的名字都是renzhiyuan,才造成了这个问题。

3、slave重新登陆:(解决)

mysql-urepuser -pxxx -h192.168.1.220 --ssl-ca=/etc/mysql/ssl/cacert.pem--ssl-cert=/etc/mysql/ssl/slave.crt --ssl-key=/etc/mysql/ssl/slave.key

dddd89b832a31b33f103503bc6ce6d45.png

原文:http://renzhiyuan.blog.51cto.com/10433137/1885561

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值