MySQL主从同步的坑
来源:互联网 发布:mac app如何打包成dmg 编辑:程序博客网 时间:2024/06/06 01:03
配置完slave后,show slave status\G;
报错如下
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.000002' at 120, the last event read from './mysql-bin.000002' at 120, the last byte read from './mysql-bin.000002' at 120
后来发现是因为主库MySQL版本是5.6, 从库是5.5
5.6的版本中加入了replication event checksum,主从复制时间校验功能,所以需要把这个关掉才能正常同步到5.5的slave
修改主库 /etc/my.cnf
增加下一行
binlog_checksum=none
重启mysql
现在再看从库status就正常了~
mysql> show slave status\G;*************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: 192.168.0.121 Master_User: replication Master_Port: 3306 Connect_Retry: 60 Master_Log_File: mysql-bin.000003 Read_Master_Log_Pos: 120 Relay_Log_File: mysqld-relay-bin.000002 Relay_Log_Pos: 266 Relay_Master_Log_File: mysql-bin.000003 Slave_IO_Running: Yes Slave_SQL_Running: Yes Replicate_Do_DB: kudong Replicate_Ignore_DB: mysql,information_schema Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 120 Relay_Log_Space: 423 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 Master_SSL_Allowed: No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: 0Master_SSL_Verify_Server_Cert: No Last_IO_Errno: 0 Last_IO_Error: Last_SQL_Errno: 0 Last_SQL_Error: Replicate_Ignore_Server_Ids: Master_Server_Id: 11 row in set (0.00 sec)
0 0
- MySQL主从同步的坑
- mysql的主从同步
- mysql主从同步的一些坑
- MySQL主从同步的机制
- mysql数据库的主从同步
- MySQL主从同步的问题解决
- Mysql的主从同步设置
- MySQL 的主从 Replication同步
- MySQL主从同步的机制
- mysql数据库的主从同步
- Mysql主从同步的配置
- MysQL数据库的主从同步
- Mysql的主从同步和双向同步
- [Mysql]主从同步的快速设置
- MySQL数据库主从同步的配置
- mysql单个表的主从同步
- MySQL数据库的主从同步配置
- Mysql,主从数据同步的搭建步骤
- 如何在Word中排出漂亮的代码
- centos7用户权限设置
- strftime和strptime使用(时间日期的格式控制函数)
- resultMap和resultType引起的错误
- Combination Sum
- MySQL主从同步的坑
- STM32时钟配置方法详解
- ConcurrentHashMap<K,V>
- ActionContext和ServletActionContext介绍
- Add Binary
- struts国际化
- C语言localtime()函数:获取当前时间和日期并转换为本地时间
- 贪心算法最简单的硬币找钱问题
- iOS基础知识:类目、延展