案例:今天实施MySQL主从+SSL加密传输时候,master为slave签署证书有一个小小问题:
failedto update databaseTXT_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(采用)[[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
原文:http://renzhiyuan.blog.51cto.com/10433137/1885561