MySQL主从架构及基于SSL实现数据复制
时间:2021-07-01 10:21:17
帮助过:42人阅读
MySQL主从架构及基于SSL实现数据复制一:Mysql主从架构拓扑图:二:MySQL主从架构相关知识点在MySQL的主从架构中,有关键的三个线程:dumpthread:当主服务器上的有
MySQL主从架构及基于SSL实现数据复制
一:

二: MySQL主从架构相关知识点
三:MySQL的主从架构的过程
主服务器配置

从服务器配置
打开中继日志 修改server-id为15 


注:重启MySQL服务查看开启状态
从服务器的配置建议使用CHANGE MASTER TO 命令

验证MySQL服务器的主从复制
主服务器:创建student表 
查看从服务器 
四 :在配置过程中遇到的问题
在启动从服务器过程中遇到ERROR 1201

查看从服务器日志 
从日志中 可以发现 可能是由于从服务器的 中继日志导致的 。
查看结果

问题点二
配置完成后启动从服务器时出现error 1236错误如下 
查找从服务器的日志
从日志中可以看出,是从服务器在查找主服务器最新的二进制log时时出错,香港服务器租用,下面是从服务器的相关信息

查看主服务器 
对比发现,从服务器指向的最新二进制日志与主服务器不一致导致出错 修改如下: 
五 :总结
查看错误日志,及Goolge ,网站空间,及在出现问题,要找到问题出现的原因,许多问题都是可以迎刃而解的。这点小小的经验,希望能给大家带来帮助,彼此共勉吧,呵呵! 本文出自 “好望角” 博客,香港虚拟主机,请务必保留此出处