mysql学习2

 主从复制报错信息:
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;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/89545/viewspace-2080571/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/89545/viewspace-2080571/

你可能感兴趣的:(数据库)