本文共 719 字,大约阅读时间需要 2 分钟。
案例:今天实施MySQL主从+SSL加密传输时候,master为slave签署证书有一个小小问题:
failedto update database TXT_DBerror number 2
[root@mysql-masterssl]# openssl ca -in /tmp/slave.csr -out /tmp/slave.crt -days 3650
一开始没留意,最后导致在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(采用)
[root@mysql-master CA]# cat index.txt.attrunique_subject = no[root@mysql-master 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
转载地址:http://mldjl.baihongyu.com/