主从复制报错信息:
mysql> show slave status \G;
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Relay_Master_Log_File: log-bin.000006
Slave_IO_Running: Yes
Slave_SQL_Running: No
Last_Errno: 1206
Last_Error: Could not execute Delete_rows event on table my_learn.test4; The total number of locks exceeds the lock table size, Error_code: 1206; handler error HA_ERR_LOCK_TABLE_FULL; the event's master log log-bin.000006, end_log_pos 1387576763
Exec_Master_Log_Pos: 120
查看mysql错误代码:
错误:1206 SQLSTATE: HY000 (ER_LOCK_TABLE_FULL)
消息:总的锁定数超出了锁定表的大小。
此类解决方法:
1. 查看 max_write_lock_count 和 innodb_buffer_pool_size参数的值,修改 innodb_buffer_pool_size的值,增大到符合需求
2. 对于大批量DML语句,要分批提交。
主从复制进程的处理:
mysql> stop slave;
mysql> change master to master_log_file='log-bin.000006',master_log_pos=120;
Query OK, 0 rows affected, 2 warnings (0.34 sec)
--此步注意,以执行写的binlog和POS点为准。
Relay_Master_Log_File: log-bin.000006
Exec_Master_Log_Pos: 120
mysql> start slave;
上一篇:mysql的linux机器优化方法是什么
下一篇:怎么理解Innodb一致性非锁定读
mysql









