iyufygfd 发表于 2016-12-26 09:44:10

MySQL主从ssl加密传输报错解决

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

failedto update database TXT_DBerror number 2

一开始没留意,最后导致在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(采用)

1
2
3
# cat index.txt.attr
unique_subject = no
#




2.2)将comonName设置为不同
在master和slave中,因为我用的名字都是renzhiyuan,才造成了这个问题。

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

1
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








页: [1]
查看完整版本: MySQL主从ssl加密传输报错解决