从服务器错误代码:
0 1 |
Last_IO_Errno: 1236 Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Slave can not handle replication events with the checksum that master is configured to log; the first event 'mysql-bin.000005' at 16750821, the last event read from '/usr/local/mysql/Binlog/mysql-bin.000005' at 16750821, the last byte read from '/usr/local/mysql/Binlog/mysql-bin.000005' at 120.' |
大概分析了一下原因,个人认为很可能的因素的由于①mysql版本不同导致;②备份不完全导致的。之前配置版本相同的mysql是不存在这个问题的。(时间问题,没有具体测试原因)SourceByrd's Weblog-https://note.t4x.org/error/last-io-error-maybe-version-problem/
主服务器由于上次php导致的宕机,升级到了最新版本的mysql(5.6.29),而从服务器我刚刚编译的时候使用的5.5.49这个版本的db,因此推断可能是由于这个问题导致的,没有去看官方文档,只是个人猜测。SourceByrd's Weblog-https://note.t4x.org/error/last-io-error-maybe-version-problem/
版本不同导致的另外一个问题是:
0 1 2 |
[root@Backup tmp]# /usr/local/mysql/bin/mysql -uroot -p <./all.sql Enter password: ERROR 1064 (42000) at line 279: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'STATS_PERSISTENT=0' at line 11 |
我偷懒,直接重新编译一个相同版本的mysql了事,具体原因和版本不同,没有仔细研究。SourceByrd's Weblog-https://note.t4x.org/error/last-io-error-maybe-version-problem/
slave临时跳过错误方法:
0 1 2 |
mysql>slave stop; #stop slave mysql>SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; mysql>slave start; #start slave |
slave永久跳过错误的方法:
0 1 2 3 |
vi /etc/my.cnf [mysqld] slave-skip-errors=1062,1053,1146 #跳过指定error no类型的错误 #slave-skip-errors=all #跳过所有错误 |
相关文档:
错误代码:https://note.t4x.org/error/mysql-replication-last_sql_errno/
主从同步:https://note.t4x.org/database/configuration-mysql-master-slave/SourceByrd's Weblog-https://note.t4x.org/error/last-io-error-maybe-version-problem/ SourceByrd's Weblog-https://note.t4x.org/error/last-io-error-maybe-version-problem/
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!